Package org.approvej.scrub
Class RelativeDateScrubber
java.lang.Object
org.approvej.scrub.RelativeDateScrubber
Scrubs a
String by replacing all occurrences of a date pattern with relative
descriptions, like [today], [yesterday], [2 days from now]
, [21 days ago] .-
Method Summary
Modifier and TypeMethodDescriptionstatic RelativeDateScrubberrelativeDates(DateTimeFormatter dateFormatPattern) CreatesScrubberto replace date strings of the given pattern.
-
Method Details
-
relativeDates
CreatesScrubberto replace date strings of the given pattern.- Parameters:
dateFormatPattern- aDateTimeFormatterto parse the dates- Returns:
- a new
RelativeDateScrubberwith the givenDateTimeFormatter.
-
apply
-