-
- All Implemented Interfaces:
@Named() public final class TimeSpecHelperThere are use-cases when we want to specify particular offsets for target actions in configs, e.g.
T + 1stands for tomorrow,Tfor today, etc. This method allows to get target time for the offset defined by the given spec.Supported formats:
T- current time from ClockProviderT - N- current time minusNdays, e.g.T - 1,T - 2, etcT + N- current time minusNdays, e.g.T + 1,T + 2, etc
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTimeSpecHelper.TimePattern
-
Constructor Summary
Constructors Constructor Description TimeSpecHelper(ClockProvider clockProvider)
-
Method Summary
Modifier and Type Method Description final ZonedDateTimegetTime(String timeSpec)final ZonedDateTimemaybeGetTime(String timeSpec)-
-
Constructor Detail
-
TimeSpecHelper
TimeSpecHelper(ClockProvider clockProvider)
-
-
Method Detail
-
getTime
final ZonedDateTime getTime(String timeSpec)
-
maybeGetTime
final ZonedDateTime maybeGetTime(String timeSpec)
-
-
-
-