@CompileStatic class DateConversionHelper extends java.lang.Object implements ValueConverter
| Type | Name and description |
|---|---|
boolean |
dateParsingLenientWhether data parsing is lenient |
java.util.List<java.lang.String> |
formatStringsA List of String which represent date formats compatible with java.text.SimpleDateFormat. |
| Constructor and description |
|---|
DateConversionHelper() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
canConvert(java.lang.Object value) |
|
java.lang.Object |
convert(java.lang.Object value)Converts a date and time with an offset, such as 2024-05-01T10:00:00Z or
2024-05-01T10:00:00+02:00, as ISO 8601 writes it, and as Grails renders a date in
JSON, to the instant it names, whatever the zone of the server. |
|
java.lang.Class<?> |
getTargetType() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Whether data parsing is lenient
A List of String which represent date formats compatible with java.text.SimpleDateFormat. When This converter attempts to convert a String to a Date, these formats will be tried in the order in which they appear in the List.
Converts a date and time with an offset, such as 2024-05-01T10:00:00Z or
2024-05-01T10:00:00+02:00, as ISO 8601 writes it, and as Grails renders a date in
JSON, to the instant it names, whatever the zone of the server. Any other value is
converted by the first of the formatStrings that reads all of it, and a value that
none of them reads all of by the first that reads the start of it, as before.