r/javascript • • Mar 18 '26

`new Date()` considered harmful

https://futuresearch.ai/blog/javascript-thinks-everythings-a-date/
0 Upvotes

14 comments sorted by

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.

2

u/senocular Mar 18 '26

Thanks, Java!

1

u/Brilla-Bose JS paying my bills 🙃 Apr 21 '26

that's why we have temporal api now. hope Apple support it ASAP. but we have polyfills if you really go into it.