4 ms·
And while there are libraries which wrap Date in JS, there is no replacement that I've seen anyone propose. Why is a replacement needed you ask? Because Date st
by UnoriginalGuy 11y ago
And while there are libraries which wrap Date in JS, there is no replacement that I've seen anyone propose. Why is a replacement needed you ask? Because Date still has exclusive access to a lot of underlying browser/OS DateTime information which isn't accessible any other way.
In Java you legitimately have alternatives, since the alternatives can make the same raw OS calls that the java.util.Date library does. Not so in JS. So instead we HAVE to work with Date and work around its many warts.
I've used quite a few DateTime libraries extensively, I'm yet to see someone "better" the DateTime .Net class. It "just works" and has few to no "gotchas."
- serve_yay 11y agoI don't think anyone would say JS's date situation is better than .NET's. .NET's is excellent, I agree. I wish we had something like that. You can't even reliably get the current locale in JS, it's insane.