Skip to content

Commit f21cbce

Browse files
committed
fix: ICS generator
1 parent 3f1bb11 commit f21cbce

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

app/UA0/scripts/development/main/icsGenerator.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,16 @@ PRODID:${ICS_CONFIG.PRODUCT_ID}
112112
const date = new Date(startDate)
113113
date.setDate(startDate.getDate() + dayOffset)
114114

115+
// Formatage pour le fichier ICS (avec padding)
115116
const yearStr = date.getFullYear().toString()
116117
const monthStr = (date.getMonth() + 1).toString().padStart(2, '0')
117118
const dayStr = date.getDate().toString().padStart(2, '0')
118119

119-
const monthKey = `${yearStr}-${monthStr}`
120-
const dayData = scheduleData[monthKey]?.[dayStr] || []
120+
// Formatage pour chercher dans scheduleData (sans padding)
121+
const monthKey = `${yearStr}-${date.getMonth() + 1}`
122+
const dayKey = date.getDate().toString()
123+
124+
const dayData = scheduleData[monthKey]?.[dayKey] || []
121125

122126
const eventName = dayData[1] || null
123127
if (eventName) {

app/UA0/scripts/development/serviceWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CACHE_NAME = 'v76'
1+
const CACHE_NAME = 'v77'
22
const MEDIA_CACHE_NAME = `media-${CACHE_NAME}`
33
const ROOT_PATH = `/app/UA0/`
44
const OFFLINE_URL = `${ROOT_PATH}index.html`

app/UA0/scripts/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/UA0/sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)