according to a good friend, the moment for moment has passed. I should move on to something cool! like day.js?
parent
896b965879
commit
819f8528b6
@ -1,12 +1,14 @@
|
||||
|
||||
// momentjs verification tests
|
||||
const moment = require('moment')
|
||||
var dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
dayjs.extend(utc)
|
||||
|
||||
test('momentjs from UTC to UTC+1', () => {
|
||||
|
||||
const date = moment
|
||||
const date = dayjs
|
||||
.utc("2021-03-02T16:13:27.921888Z")
|
||||
.utcOffset("+01:00")
|
||||
.utcOffset(60)
|
||||
|
||||
expect(date.format("YYYY-MM-DD")).toEqual("2021-03-02")
|
||||
expect(date.format("HH-mm-ss")).toEqual("17-13-27")
|
Loading…
Reference in new issue