purescript-datetime icon indicating copy to clipboard operation
purescript-datetime copied to clipboard

Second is limited to 59 seconds

Open no-longer-on-githu-b opened this issue 8 years ago • 2 comments
trafficstars

How does one represent datetimes with leap seconds such as 60 and 61?

no-longer-on-githu-b avatar Feb 07 '17 08:02 no-longer-on-githu-b

I think the "ideal" solution would be to increase upper bound of Second. Second is analogous to Day in the way how some of its values are not valid for certain dates.

That is obviously a breaking change, and unaware users would easily assume top == 59 for Second.

anilanar avatar Apr 04 '17 22:04 anilanar

Yeah, I'm really torn on this one.

With the current "algorithm" (lol... appealing to JS's Date object) it is an unrepresentable value, so even if we added it it would be unusable.

garyb avatar Apr 04 '17 22:04 garyb