Format · Day.js

PHOTO EMBED

Wed Jan 05 2022 11:27:55 GMT+0000 (Coordinated Universal Time)

Saved by @fbturk

dayjs().format() 
// current date in ISO8601, without fraction seconds e.g. '2020-04-02T08:02:17-05:00'

dayjs('2019-01-25').format('[YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z]') 
// 'YYYYescape 2019-01-25T00:00:00-02:00Z'

dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
content_copyCOPY

https://day.js.org/docs/en/display/format