Inaccurate date conversion
SheetJSDev opened this issue · comments
Eric P Sheets commented
h/t @notatestuser (from SheetJS/sheetjs#51):
$ ssf 'yyyy-mm-dd hh:mm:ss' 41722.4097222222
41722.4097222222|2014-03-24 09:49:60
That should be 2014-03-24 09:50:00
Eric P Sheets commented
> require('ssf').parse_date_code(41722.4097222222)
{ D: 41722,
T: 35399,
u: 0.999997834675014,
y: 2014,
m: 3,
d: 24,
S: 59,
M: 49,
H: 9,
q: 1 }
The subseconds should be rounded up in this case
Luke Plaster commented
Nicely done! Any chance of a publish of ssf? Appreciated.
Eric P Sheets commented
@notatestuser thanks for your help. Finally fixed some long-standing issues with date rounding and just published 0.6.0