pub enum ParseError {
AmPmWithoutHour,
ImpossibleTimestamp(&'static str),
InvalidNumeric(String),
UnrecognizedFormat,
UnrecognizedToken(String),
TimezoneUnsupported,
YearMonthDayError(&'static str),
NoDate,
}Expand description
Potential errors that come up when trying to parse time strings
Variants§
AmPmWithoutHour
Attempted to specify “AM” or “PM” without indicating an hour
ImpossibleTimestamp(&'static str)
Impossible value for a category; the 32nd day of a month is impossible
InvalidNumeric(String)
Unable to parse a numeric value from a token expected to be numeric
UnrecognizedFormat
Generally unrecognized date string; please report to maintainer so new test cases can be developed
UnrecognizedToken(String)
A token the parser did not recognize was in the string, and fuzzy mode was off
TimezoneUnsupported
A timezone could not be handled; please report to maintainer as the timestring likely exposes a bug in the implementation
YearMonthDayError(&'static str)
Parser unable to make sense of year/month/day parameters in the time string; please report to maintainer as the timestring likely exposes a bug in implementation
NoDate
Parser unable to find any date/time-related content in the supplied string