Converting To and Using js-joda

node v10.15.1
version: 1.0.0
The native JavaScript Date library is very, well, _lightweight_, so libraries such as js-joda can help. Once a native date is converted to a js-joda one, with a little (unnecessary?!) help:
const { LocalDate, TemporalAdjusters } = require("js-joda") const nativeDate = new Date() // const localDate = LocalDate.parse(new Date().toISOString().split("T")[0])
... you can start to take advantage of its powerful features:

no comments

    sign in to comment