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

Regenerate tests

Need to make this automated
This commit is contained in:
Bradlee Speice
2018-07-08 21:16:43 -04:00
parent c038178583
commit 9008ee8339
2 changed files with 37 additions and 1 deletions

View File

@ -1068,7 +1068,6 @@ impl Parser {
if hms == 0 {
res.hour = Some(value.to_i64().unwrap() as i32);
if !close_to_integer(&value) {
// TODO: High probability of issues with rounding here.
res.minute = Some((*SIXTY * (value % *ONE)).to_i64().unwrap() as i32);
}
} else if hms == 1 {
@ -1088,6 +1087,7 @@ impl Parser {
}
fn parse_min_sec(&self, value: Decimal) -> (i32, Option<i32>) {
// UNWRAP: i64 guaranteed to be fine because of preceding floor
let minute = value.floor().to_i64().unwrap() as i32;
let mut second = None;