3 ms·
> I use a few libraries (for mapping, datetime I'm really looking forward to Temporal [0] reaching a larger baseline. Between that and a lot of recent Intl pie
by WorldMaker 1y ago
> I use a few libraries (for mapping, datetime
I'm really looking forward to Temporal [0] reaching a larger baseline. Between that and a lot of recent Intl pieces we are so close to not needing libraries for much of anything datetime related.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- mholt 1y agoYeah, 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.