If you run this JavaScript function on the 31st of a month, the result will be a month off. The best part is that this is the intended behvaior. JavaScript is a cursed language.
ftatateeta @ ftatateeta @lemmy.ml Posts 0Comments 3Joined 2 yr. ago
ftatateeta @ ftatateeta @lemmy.ml
Posts
0
Comments
3
Joined
2 yr. ago
I would expect the month to increment by one and the day to be clamped to the valid days for the month.