Reinstate what was PR made for

This commit is contained in:
Ismaël Moret 2023-10-16 15:32:25 +02:00 committed by GitHub
parent a32f80a0ff
commit d3649ee1a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,20 +21,10 @@ module.exports = {
if (!data.events) return programs
data.events.forEach(item => {
if (item.title && item.startTime && item.endTime) {
const start = dayjs
.utc(item.startTime, 'HH:mm')
.set('D', date.get('D'))
.set('M', date.get('M'))
.set('y', date.get('y'))
.toString()
const stop = dayjs
.utc(item.endTime, 'HH:mm')
.set('D', date.get('D'))
.set('M', date.get('M'))
.set('y', date.get('y'))
.toString()
if (item.title && item.startTime && item.duration) {
const start = parseStart(item, date)
const duration = parseInt(item.duration)
const stop = start.add(duration, 'm')
programs.push({
title: item.displayTitle || item.title,