mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Fix invalid date
This commit is contained in:
parent
b4f863c9f0
commit
1cda2233a1
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||||
const timezone = require('dayjs/plugin/timezone')
|
const timezone = require('dayjs/plugin/timezone')
|
||||||
|
require('dayjs/locale/id')
|
||||||
|
|
||||||
dayjs.extend(utc)
|
dayjs.extend(utc)
|
||||||
dayjs.extend(customParseFormat)
|
dayjs.extend(customParseFormat)
|
||||||
|
@ -23,8 +24,8 @@ module.exports = {
|
||||||
|
|
||||||
const scheduleDate = dom.window.document.querySelector(
|
const scheduleDate = dom.window.document.querySelector(
|
||||||
'div.b-livestreaming-daily-schedule__date-label'
|
'div.b-livestreaming-daily-schedule__date-label'
|
||||||
).textContent
|
).textContent.split(',')
|
||||||
const currdate = dayjs(scheduleDate)
|
const currdate = dayjs(scheduleDate[1], 'DD MMMM YYYY', 'id')
|
||||||
const list = dom.window.document.querySelector(
|
const list = dom.window.document.querySelector(
|
||||||
`#schedule-content-${currdate.format(
|
`#schedule-content-${currdate.format(
|
||||||
'YYYYMMDD'
|
'YYYYMMDD'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue