cal.diy
cal.diy copied to clipboard
ICS event is off by one month
Issue Summary
ics files have the wrong date (1 month to early).
Steps to Reproduce
- Create event
- Download ics or download ics attachement
Technical details
- dayjs uses 0 index month (jan = 0)
- ics uses 1 index month (jan = 1)
Hotfix
start: date.utc().toArray().slice(0, 6)
to
start: date.utc().toArray().slice(0, 6).map((v, i) => i === 1 ? v + 1 : v)
Thanks for investigating this! I'll implement this hotfix today, not a fan of the choice to 1-index on ICS's part.