Package org.ametys.core.util.date
Class AdaptableDateParser
java.lang.Object
org.ametys.core.util.date.AdaptableDateParser
Class for parsing a
See documentation of
String
and converting it to an AdaptableDate
.
See documentation of
parse(java.lang.String)
method.-
Method Summary
Modifier and TypeMethodDescriptionstatic final AdaptableDate
Parses the givenString
as anAdaptableDate
It accepts the following syntax:2019-01-01T09:30:00+01:00
to have astatic
date (based on theDateTimeFormatter.ISO_DATE_TIME
format)$current
to have thecurrent
date$ago$2$Minutes
to have a date in thepast
$in$3$Weeks
to have a date in thefuture
-
Method Details
-
parse
Parses the givenString
as anAdaptableDate
It accepts the following syntax:2019-01-01T09:30:00+01:00
to have astatic
date (based on theDateTimeFormatter.ISO_DATE_TIME
format)$current
to have thecurrent
date$ago$2$Minutes
to have a date in thepast
$in$3$Weeks
to have a date in thefuture
- Parameters:
value
- The string value to parse- Returns:
- The
AdaptableDate
- Throws:
IllegalArgumentException
- if the string value cannot be parsed as anAdaptableDate
-