mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Bug fix for single digit days
This commit is contained in:
parent
472f03e981
commit
8b1be0607f
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ function parseItems(context) {
|
||||||
const $ = cheerio.load(context.content)
|
const $ = cheerio.load(context.content)
|
||||||
const schDayMonths = $('.date-slider .month').toArray()
|
const schDayMonths = $('.date-slider .month').toArray()
|
||||||
const schPrograms = $('.desc-slider .list-slider').toArray()
|
const schPrograms = $('.desc-slider .list-slider').toArray()
|
||||||
const monthDate = dayjs(context.date).format('MMM D')
|
const monthDate = dayjs(context.date).format('MMM DD')
|
||||||
const items = [];
|
const items = [];
|
||||||
|
|
||||||
schDayMonths.forEach(function(schDayMonth, i) {
|
schDayMonths.forEach(function(schDayMonth, i) {
|
||||||
|
@ -99,6 +99,6 @@ function parseStop(schDayMonth, itemCurrent, itemNext) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return dayjs.tz(currentYear + ' ' + monthDate[0] + ' ' + (parseInt(monthDate[1]) + 1) + ' 00:00', 'YYYY MMM DD HH:mm', 'Asia/Jakarta')
|
return dayjs.tz(currentYear + ' ' + monthDate[0] + ' ' + (parseInt(monthDate[1]) + 1).toString().padStart(2, '0') + ' 00:00', 'YYYY MMM DD HH:mm', 'Asia/Jakarta')
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue