Package org.ametys.core.util.date
Class AdaptableDateParser
- java.lang.Object
-
- org.ametys.core.util.date.AdaptableDateParser
-
public final class AdaptableDateParser extends Object
Class for parsing aStringand converting it to anAdaptableDate.
See documentation ofparse(java.lang.String)method.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AdaptableDateparse(String value)Parses the givenStringas anAdaptableDate
It accepts the following syntax:2019-01-01T09:30:00+01:00to have astaticdate (based on theDateTimeFormatter.ISO_DATE_TIMEformat)$currentto have thecurrentdate$ago$2$Minutesto have a date in thepast$in$3$Weeksto have a date in thefuture
-
-
-
Method Detail
-
parse
public static final AdaptableDate parse(String value)
Parses the givenStringas anAdaptableDate
It accepts the following syntax:2019-01-01T09:30:00+01:00to have astaticdate (based on theDateTimeFormatter.ISO_DATE_TIMEformat)$currentto have thecurrentdate$ago$2$Minutesto have a date in thepast$in$3$Weeksto 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
-
-