showing results for - "why in the hell does javascript date getmonth 28 29 return 11"
Jawad
09 Sep 2016
1npm install --save proposal-temporal
2
3// temporal-test.js
4const { Temporal } = require('proposal-temporal');
5
6// or as an ES module
7// import { Temporal } from 'proposal-temporal/lib/index.mjs';
8
9// 11 means November now!
10const date = new Temporal.PlainDate(2020, 11, 26); // => 2020-11-26
11
12const sameDate = Temporal.PlainDate.from(
13                {year: 2020, month: 11, day: 26}); // => 2020-11-26
14
similar questions