| ▲ | crabl 13 hours ago |
| we've been using this Temporal polyfill and it's been awesome so far: https://github.com/js-temporal/temporal-polyfill |
|
| ▲ | mediumdeviation 10 hours ago | parent | next [-] |
| Note that this is 51kb, it's not exactly lightweight https://bundlephobia.com/package/@js-temporal/polyfill@0.5.1. Still good for forward compatibility or on the server, but for smaller apps it's significant. |
| |
|
| ▲ | whizzter 13 hours ago | parent | prev [-] |
| How is it compared to moment and especially luxon? |
| |
| ▲ | MrJohz 8 hours ago | parent | next [-] | | It is a lot more complex than moment, but only because there's a lot of inherent complexity to dates and times that moment just doesn't deal with. So you need to be explicit about whether you're dealing with dates, times, or datetime objects, whether or not the object you're working with has a timezone, etc. Where moment is generally designed to have a convenient API, Temporal is designed to have a correct API. | |
| ▲ | kristo 12 hours ago | parent | prev | next [-] | | It’s a web standard api and very small weight. Highly recommend. | |
| ▲ | socalgal2 9 hours ago | parent | prev [-] | | Didn't moment basically say in so many words, use Temporal? | | |
|