Package org.approvej.scrub
Class DateTimeScrubber
java.lang.Object
org.approvej.scrub.RegexScrubber
org.approvej.scrub.DateTimeScrubber
Special
RegexScrubber to scrub date/time strings described by a DateTimeFormatter
pattern like "yyyy-MM-dd" for local dates.-
Method Summary
Modifier and TypeMethodDescriptionreplacement(String staticReplacement) Set the replacementFunctionalways returning the given staticReplacement.replacement(Replacement replacement) Set theReplacementto be used.Makes this use arelativeDateto replace matches of thedateTimePattern.Methods inherited from class org.approvej.scrub.RegexScrubber
apply
-
Method Details
-
replacement
Description copied from class:RegexScrubberSet theReplacementto be used.- Overrides:
replacementin classRegexScrubber- Parameters:
replacement- aReplacementfunction- Returns:
- this
-
replacement
Description copied from class:RegexScrubberSet the replacementFunctionalways returning the given staticReplacement.- Overrides:
replacementin classRegexScrubber- Parameters:
staticReplacement- the static replacementString- Returns:
- this
-
replaceWithRelativeDate
Makes this use arelativeDateto replace matches of thedateTimePattern.- Returns:
- this
-