parseStrict method

DateTime parseStrict (String inputString, [ dynamic utc = false ])

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 rejct strings with additional characters (including whitespace) after a valid date. For looser parsing, use parse.

Implementation

DateTime parseStrict(String inputString, [utc = false]) =>
    _parse(inputString, utc: utc, strict: true);