1
0
mirror of https://github.com/bspeice/dtparse synced 2025-07-03 14:54:57 -04:00

Much simpler API surface

And getting rid of the dumb "internal" error type
This commit is contained in:
Bradlee Speice
2018-07-24 23:28:38 -04:00
parent c6feaebe71
commit 44e37b364c
5 changed files with 150 additions and 178 deletions

View File

@ -64,7 +64,7 @@ pub fn day_of_week(year: u32, month: u32, day: u32) -> ParseResult<DayOfWeek> {
let c = (year - 1) / 100;
(c, year - 1 - 100 * c)
},
_ => return Err(ParseError::InvalidMonth)
_ => return Err(ParseError::ImpossibleTimestamp("Invalid month"))
};
let e = match month {