4 ms·
That would have a better solution in a date.getCurrentMonth(), in my opinion.
by oblio 1y ago
That would have a better solution in a date.getCurrentMonth(), in my opinion.
- kaoD 1y agoTemporal[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/ https://tc39.es/proposal-temporal/docs/ [1] https://tc39.es/proposal-temporal/docs/plaindate.html#month https://tc39.es/proposal-temporal/docs/plaindate.html#month