mirror of
https://github.com/bspeice/dtparse
synced 2025-07-01 05:46:14 -04:00
Handle fractional minutes correctly
This commit is contained in:
@ -1269,8 +1269,9 @@ impl Parser {
|
||||
let minute = value.floor().to_i64().unwrap() as i32;
|
||||
let mut second = None;
|
||||
|
||||
let sec_remainder = value % *ONE;
|
||||
let sec_remainder = value - value.floor();
|
||||
if sec_remainder != *ZERO {
|
||||
println!("{}", *SIXTY * sec_remainder);
|
||||
second = Some((*SIXTY * sec_remainder).floor().to_i64().unwrap() as i32);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user