Comment by oblio 4 months ago That would have a better solution in a date.getCurrentMonth(), in my opinion. 1 comment oblio Reply kaoD 4 months ago Temporal[0] is coming which solves many many many issues with JS Date, 1-based months[1] included!Can't wait for it to be stable and widely available, it's just too good.> month values start at 1, which is different from legacy Date where months are represented by zero-based indices (0 to 11)[0] https://tc39.es/proposal-temporal/docs/[1] https://tc39.es/proposal-temporal/docs/plaindate.html#month
kaoD 4 months ago Temporal[0] is coming which solves many many many issues with JS Date, 1-based months[1] included!Can't wait for it to be stable and widely available, it's just too good.> month values start at 1, which is different from legacy Date where months are represented by zero-based indices (0 to 11)[0] https://tc39.es/proposal-temporal/docs/[1] https://tc39.es/proposal-temporal/docs/plaindate.html#month
Temporal[0] is coming which solves many many many issues with JS Date, 1-based months[1] included!
Can't wait for it to be stable and widely available, it's just too good.
> month values start at 1, which is different from legacy Date where months are represented by zero-based indices (0 to 11)
[0] https://tc39.es/proposal-temporal/docs/
[1] https://tc39.es/proposal-temporal/docs/plaindate.html#month