tryDecode method
Parses formattedDateTime
to a DateTime as specified by the pattern.
Parts of a DateTime which are not mentioned in the pattern default to a value of zero for time parts and year, and a value of 1 for day and month.
Returns the parsed value, or null
if the formattedDateTime
does not
match the pattern.
Implementation
DateTime? tryDecode(String formattedDateTime) =>
_decode(formattedDateTime, isUtc, false);