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.
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.
Floating point rounding issues are basic comp science issues. Hopefully nobody thinks that those are JavaScript quirks.