From 09e5375a09857659c5fd55cc9616baf288ad56ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= <30985701+BellezaEmporium@users.noreply.github.com> Date: Thu, 25 Sep 2025 16:33:18 +0000 Subject: [PATCH] simplify --- sites/vodafone.pt/vodafone.pt.config.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sites/vodafone.pt/vodafone.pt.config.js b/sites/vodafone.pt/vodafone.pt.config.js index 2726cb94..dd4f47c1 100644 --- a/sites/vodafone.pt/vodafone.pt.config.js +++ b/sites/vodafone.pt/vodafone.pt.config.js @@ -15,8 +15,7 @@ module.exports = { }, url: function ({ channel, date }) { const datetime = DateTime.fromJSDate(date.toDate()).setZone('Europe/Lisbon') - const month = datetime.month - const formattedMonth = month < 10 ? `0${month}` : month + const formattedMonth = datetime.month < 10 ? `0${datetime.month}` : datetime.month const formattedDay = datetime.day < 10 ? `0${datetime.day}` : datetime.day return `${API_ENDPOINT}/${channel.site_id}/${date.year()}/${formattedMonth}/${formattedDay}/00-06` }, @@ -25,8 +24,7 @@ module.exports = { let items = parseItems(content) if (!items.length) return programs const datetime = DateTime.fromJSDate(date.toDate()).setZone('Europe/Lisbon') - const month = datetime.month - const formattedMonth = month < 10 ? `0${month}` : month + const formattedMonth = datetime.month < 10 ? `0${datetime.month}` : datetime.month const formattedDay = datetime.day < 10 ? `0${datetime.day}` : datetime.day // map all periods of time to promises in order to get a full schedule in one row const promises = [