Re:Dates and Times in JavaScript – A New API for Dates from ...
by noja on Thursday July 09, 2020 @02:14PM
(#23783248)
Three days and an hour more than you think, because it's the weekend, and an extra day because the public holiday for tomorrow may or not be a working day. Oh and there was a timezone change.
[ Parent
| on HN ]
Re:Dates and Times in JavaScript – A New API for Dates from ...
by bonedangle on Thursday July 09, 2020 @02:44PM
(#23783571)
And it's December 31st..
Still shocked by how many times I see a year rollover go bad.
Re:Dates and Times in JavaScript – A New API for Dates from ...
by unilynx on Thursday July 09, 2020 @05:15PM
(#23785314)
Even before the rollover it get's bad. I had a CI failure on 31 December 2018 for code which worked fine on 31 December 2017, because it was the first time for that code to have Dec 31 in week 1 of the next year.
And last year someone else's code failed on 30 December 2019, so I had a pretty good idea where to look.
Still need to fix a bug in code written only yesteryear because the 1st of July wasn't on a Monday this year, but I decided to snooze that test failure ... it'll work fine again in 9 years.
Re:Dates and Times in JavaScript – A New API for Dates from ...
by aarong11 on Thursday July 09, 2020 @02:51PM
(#23783668)
There was a leap second too, you forgot that one!
Re:Dates and Times in JavaScript – A New API for Dates from ...
by timgilbert on Thursday July 09, 2020 @03:29PM
(#23784075)
...oh, and I hope you know whether your customer is Israeli or Palestinian!
Re:Dates and Times in JavaScript – A New API for Dates from ...
by reggieband on Thursday July 09, 2020 @05:31PM
(#23785462)
People joke, but I worked on a calendar application (well, it was a time series graph) where a leap second caused a rendering bug.