@rasmus Doesn't it depend on locale?
Date(2020, 4, 28).toString()
"Tue Apr 28 2020 16:48:43 GMT+0200 (Central European Summer Time)"
On a related note, I was also disappointed to see it has not implemented anything to format the object into a string, as in Python say,
@ashwinvis It seems like if you don't use the keyword new it always returns the current time.
I agree, it would be really handy. I can't think of why they haven't implemented it. The interaction with the DOM have changed dramatically because of libraries such as jQuery, so dates should also get some love
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!