News for hackers. Stuff that matters.
Re:Temporal: Getting started with JavaScript's new date time... by anamexis on Monday June 28, 2021 @12:45PM (#27664195)
I don't know where POSIX stands on this, but I think the real WTF of JavaScript's months starting at 0 is that the days start at 1. Pick one!
Re:Temporal: Getting started with JavaScript's new date time... by jcranmer on Monday June 28, 2021 @01:22PM (#27664674)
POSIX does the same thing.
Re:Temporal: Getting started with JavaScript's new date time... by randomswede on Wednesday June 30, 2021 @04:15AM (#27686206)
ETA: Ahaha, I managed to read "days" as "weekdays". The following is now. permanent marker of my reading incomprehension.

IIRC (and it's been a while, so I may well not RC), specifies that 1 is Monday, 2 is Tuesday, ..., 6 is Saturday and both 0 and 7 are Sunday. And the reason that looks weird is that there is (IIUC) a genuine difference between western nations as to if a week starts o Sunday or Monday.

Which, you know, sucks. But, also makes it somewhat easy to make a C array that you can index with a (.tm_wday%7) to easily get the day of the week.

Which may also be the reason why months start at 0.