fixed the url function: reversed the diff direction; removed unnecessary extra minute from currDate

adjusted the test as well
This commit is contained in:
marek
2022-10-21 01:42:45 -04:00
parent 2f1ebda654
commit 6145a69945
2 changed files with 3 additions and 3 deletions

View File

@@ -12,8 +12,8 @@ module.exports = {
delay: 5000,
site: 'programtv.onet.pl',
url: function ({ date, channel }) {
const currDate = dayjs.utc().startOf('d').add(1, 'm')
const day = currDate.diff(date, 'd')
const currDate = dayjs.utc().startOf('d')
const day = date.diff(currDate, 'd')
return `https://programtv.onet.pl/program-tv/${channel.site_id}?dzien=${day}`
},