Follow

Well, that's interesting. Thanks 🙄

Code:
var d = new Date('2023-01-01');
alert((d.getMonth()+1)+'/'+ d.getFullYear());

Output:
12/2022

I mean, I'm pretty sure I get why (timezone offset?), but it's still very stupid.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.