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