Files
epg/scripts/core/date.js

15 lines
268 B
JavaScript
Raw Normal View History

2025-01-01 10:18:30 +03:00
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
2023-10-15 14:08:23 +03:00
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')
}
2025-01-01 10:18:30 +03:00
export default date