r/javascript • u/robertgambee • Mar 18 '26
`new Date()` considered harmful
https://futuresearch.ai/blog/javascript-thinks-everythings-a-date/
0
Upvotes
r/javascript • u/robertgambee • Mar 18 '26
View all comments
Show parent comment
4
u/Akonova Mar 18 '26
Yes, this and many other "quicks" of javascript is one of the biggest reasons haters of javascript hate it. Not even typescript can fix this because the returned object is still technically a Date object. God forbid you try to code something critical with this like a bank app.