-
> Does this mean that converting two DateTimes into their POSIX time and subtracting them will not yield an accurate representation of number of seconds between two timestamps?
It does, so if you care about that difference, you should not do that, and use something like https://github.com/qntm/t-a-i
> Am I naive? It seems like POXIS ignoring leap seconds is a major mistake.
Depending on your needs it can be either seen as a massive mistake or a big convenience win.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Thank god!
Presumably this new API will fix the fact that JS does in fact know about some time zones, but not most.
Shield your eyes from this monstrosity that will successfully parse some dates using `new Date()` in some select special time zones, but assume UTC in the other cases:
https://github.com/v8/v8/blob/781c20568240a1e59edcf0cb5d713a...
-
Temporal will be really nice in that it supports remote time zones, allows you to iterate through daylight saving transitions, etc.
I can't wait for it to be fully taken advantage of by things such as mui's date time picker. Imagine if after selecting the fall back day, it let you pick a time during the extra hour. If after selecting the spring forward day, it wouldn't let you pick a time during the hour that doesn't exist.
This stuff matters sometimes; a user of my NVR wanted to save a clip during the fall back hour and got the wrong result because these things just don't work right today. https://github.com/scottlamb/moonfire-nvr/issues/244
-
> - Where are decimals, to avoid things like `parseInt(0.00000051) === 5`?
There is a draft proposal for this: https://github.com/tc39/proposal-decimal
Additionally, BigInt has been available for years: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
> - Why are inbuilt globals allowed to be modified?
> Error/null handling are still haphazard things.
How would you suggest addressing these in a way that is backwards compatible with all existing web content?
-
Here's a nice modern Python library in this space that claims to take influence from Temporal and Chrono - https://github.com/ariebovenberg/whenever
-
-
I’ve been using Temporal, via a different polyfill than in the article[1], in production for about 6 months now. It’s a game changer. But JavaScript people are also broken from years of not having this so it’s been a hard sell. To many it’s just extra work. We’re about to start doing international stuff though so really hoping it becomes clear why it’s amazing to the team soon.
[1]: https://github.com/js-temporal/temporal-polyfill
-
This is great but I really hope someone contributes strftime / TR35 to the v2 proposal, there's still no way to get date format string in JS like this: "%Y-%m-%d_%H-%M-%S_%s", or this "%m/%d/%H/%M:%S".
- https://github.com/js-temporal/proposal-temporal-v2/issues/5...
-
Where can I find production-ready polyfills? https://github.com/tc39/proposal-temporal/#polyfills only lists alpha and beta versions.