4 ms·
Yeah, dealing with date/time in JS has been a HUGE pain. I haven't tried Temporal yet but I hope it's better.
by mholt 1y ago
Yeah, dealing with date/time in JS has been a HUGE pain. I haven't tried Temporal yet but I hope it's better.
- BrandoElFollito 1y agoDealing with times and dates is painful everywhere (less in Go: )) I use libraries everywhere, for JS/TS this is luxon (now that the type hinting works) and arrow in Python. I do not even try to deal with dates or times directly. Hey, and thanks for Caddy!
- WorldMaker 1y agoI've used it a bit already. You can use it with an experimental flag in Deno. It takes a lot of inspiration (from among others) from the java.time library added in Java 8+ in a similar way that JS' original Date class is related to the very original Java Date class, so it basically catches up on 8+ versions of Java. It supports just about all the Date math, comparison, and calendar conversion you could ever want. It has nice toLocaleString() formatting options. It's built on immutable objects to avoid a whole class of bugs with the current JS Date.