mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update create-queue.js
This commit is contained in:
parent
62e79d982c
commit
ca3913f357
5 changed files with 47 additions and 15 deletions
13
scripts/core/date.js
Normal file
13
scripts/core/date.js
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue