class DateAndTimeTagger implements Tagger {

    @Override
    public List<Annotation> getAnnotations(String text) {
        List<Annotation> annotations = new ArrayList<>();

        List<ExtractedDate> allDates = DateParser.findDates(text, dateFormats);

        for (ExtractedDate dateTime : allDates) {

            // get the offset
            List<Integer> occurrenceIndices = StringHelper.getOccurrenceIndices(text, dateTime.getDateString());

            for (Integer index : occurrenceIndices) {
                annotations.add(new ImmutableAnnotation(index, dateTime.getDateString(), DATETIME_TAG_NAME));
            }
        }

        return annotations;
    }

    public  DateAndTimeTagger(DateFormat... dateFormats);

}