parseStrict method Null safety
Given user input, attempt to parse the inputString
into the anticipated
format, treating it as being in the local timezone.
If inputString
does not match our format, throws a FormatException.
This will reject dates whose values are not strictly valid, even if the
DateTime constructor will accept them. It will also reject strings with
additional characters (including whitespace) after a valid date. For
looser parsing, use parse.
Implementation
DateTime parseStrict(String inputString, [bool utc = false]) =>
_parse(inputString, utc: utc, strict: true);