-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
For example, given the date 1732-02-22T00:07:00.766:
date = new Date(-7506057601234)
d3.timeSecond works as expected:
d3.timeSecond(date) // 1732-02-22T00:07
d3.timeMinute should return 1732-02-22T00:07, but doesn’t:
d3.timeMinute(date) // 1732-02-22T00:06:02
d3.timeHour should return 1732-02-22T00:00, but doesn’t:
d3.timeHour(date) // 1732-02-21T23:59:02
https://beta.observablehq.com/d/3a8558e7a5a27d6e
The implementation of timeHour and timeMinute assume that minutes are 60-second and 3,600-second multiples from UNIX epoch, but apparently that’s no longer the case in the latest version of Chrome (leap seconds maybe?), so we may require a slower strategy.
techniq
Metadata
Metadata
Assignees
Labels
No labels