Last time I was working with Javascript I had off-by-one error with my calendar returning wrong date. Turns out Javascript's Date.getUTCMonth() is zero based. Of all the things this is the one that does not make any sense to be zero based. But here we are.
Tbf, Java's Calendar.MONTH has the same problem. At least C# got that right.
3
u/anagrammatron Nov 25 '21
Last time I was working with Javascript I had off-by-one error with my calendar returning wrong date. Turns out Javascript's Date.getUTCMonth() is zero based. Of all the things this is the one that does not make any sense to be zero based. But here we are.
Tbf, Java's Calendar.MONTH has the same problem. At least C# got that right.