Update create-queue.js

This commit is contained in:
Aleksandr Statciuk 2022-01-30 22:55:48 +03:00
parent 62e79d982c
commit ca3913f357
5 changed files with 47 additions and 15 deletions

13
scripts/core/date.js Normal file
View file

@ -0,0 +1,13 @@
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
dayjs.extend(utc)
const date = {}
date.getUTC = function (d = null) {
if (typeof d === 'string') return dayjs.utc(d).startOf('d')
return dayjs.utc().startOf('d')
}
module.exports = date