Comment

Comment by paulddraper

JS Dates are terrible, but not just the native stuff...there isn't a single good library either. [1]

A good library instants (1582852000000 ms since epoch), durations (5000 ms), periods (2 months), offsets (-0700), timezones (America/Denver), date (4/3/2019), and time (4:45 PM).

Instead I am stuck with good treatment of like two or three of these in any JS library I pick up -- usually instant and duration -- and I have to hammer things to fit.

[1] https://news.ycombinator.com/item?id=21669829

parent paulddraper 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton