parseZonedDateTimeQuiet
The parseZonedDateTimeQuiet
method parses the supplied string as a time zone.
Date-time strings are formatted according to the ISO-8601 format yyyy-MM-ddThh:mm:ss[.SSSSSSSSS] TZ
and others.
"Quiet" methods return null
instead of throwing an exception when encountering a string that cannot be parsed.
Syntax
parseZonedDateTimeQuiet(s)
Parameters
Parameter | Type | Description |
---|---|---|
s | string | The string to be converted. |
Returns
A ZonedDateTime, or null
if invalid input is given.
Examples
println parseZonedDateTimeQuiet("1982-09-23T11:23:00 ET")
println parseZonedDateTimeQuiet("198f2-09-23T11:23:00 ET")
- Log