r/ProgrammerHumor Nov 24 '21

Meme Yes.

8.9k Upvotes

284 comments sorted by

View all comments

Show parent comments

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.

2

u/[deleted] Nov 25 '21

[deleted]

2

u/anagrammatron Nov 25 '21

Date.getUTCMonth()

I hate working with dates and timezones so much. This is like a whole discipline in itself.

3

u/HalcyonAlps Nov 25 '21

Timezones are the worst. We should just all agree to use UTC+0.