this post was submitted on 11 Jul 2025
240 points (98.8% liked)
Programming
21545 readers
461 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I am a frontend dev. JavaScript (well, TypeScript) is my bread and butter. Even knowing its quirks I never would have thought how inconsistent
Date
actually is. I encourage everyone to try this quiz.This is what JavaScript haters should bring forth, not
0.1 + 0.2 !== 0.3
!There is a reason almost everyone use some Date lib, like Luxon and not the built in. And well, having a horrible built in lib that they can't change due to legacy code breaking is nothing really new or unique to JS.
The built-in lib is fine for basic stuff unless you do some crazy shit like expecting
"2"
to parse as a valid date.For very basic things maybe, but it has a lot of other weird problems and restrictions. Mutability, no real timezone support, very limited arithmetic, to name a few. As soon as you move beyond the very basic, you want someting more robust.