RESOLVED FIXED 220687
Date.parse returns non-integral time value
https://bugs.webkit.org/show_bug.cgi?id=220687
Summary Date.parse returns non-integral time value
Mike Fikes
Reported 2021-01-17 06:45:43 PST
Date.parse should return either an integer or NaN. Here is an example where it returns a floating point number near an integer, but is not an integer: >>> Date.parse("2514-06-01T00:00:00.148Z") 17180035200147.998 This was produced using the jsc binary included in: Safari Technology Preview Release 118 (Safari 14.1, WebKit 15611.1.9.3.1)
Attachments
Patch (7.13 KB, patch)
2021-01-31 02:03 PST, Yusuke Suzuki
no flags
Patch (8.13 KB, patch)
2021-01-31 02:49 PST, Yusuke Suzuki
no flags
Radar WebKit Bug Importer
Comment 1 2021-01-20 01:50:18 PST
Yusuke Suzuki
Comment 2 2021-01-31 02:03:45 PST
Yusuke Suzuki
Comment 3 2021-01-31 02:49:18 PST
Ross Kirsling
Comment 4 2021-01-31 11:51:00 PST
Comment on attachment 418823 [details] Patch r=me. I guess you could say there's some minor confusion potential due to using `milliseconds` to mean both "an entire timestamp in ms" and "the fractional part of the current time in ms", but I don't know if I have a suggestion, and hopefully it's still clear enough by having "seconds" and "milliseconds" be adjacent parameters.
Yusuke Suzuki
Comment 5 2021-01-31 12:31:26 PST
Comment on attachment 418823 [details] Patch Thanks!
EWS
Comment 6 2021-01-31 12:48:07 PST
Committed r272127: <https://trac.webkit.org/changeset/272127> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418823 [details].
Note You need to log in before you can comment on or make changes to this bug.