A lightweight Temporal polyfill and other futuristic JavaScript date utilities.
A spec-compliant polyfill in 16kb.
npm install temporal-polyfill
A) Import globally:
import 'temporal-polyfill/global'
console.log(Temporal.Now.zonedDateTimeISO().toString())
B) Import as an ES module without side effects:
import { Temporal } from 'temporal-polyfill'
console.log(Temporal.Now.zonedDateTimeISO().toString())
Read more about temporal-polyfill
yarn build
yarn watch
yarn test --watch
yarn test --coverage
yarn lint
yarn size