epg/scripts/core/date.js
Aleksandr Statciuk dd6d694491 Make code prettier
2022-12-29 23:50:36 +03:00

13 lines
265 B
JavaScript

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