Skip to content

Fix(calendar): all-day events in iCalendar format (RFC 5545)#906

Merged
armanddidierjean merged 3 commits intomainfrom
fix/calendar/all-day
Nov 29, 2025
Merged

Fix(calendar): all-day events in iCalendar format (RFC 5545)#906
armanddidierjean merged 3 commits intomainfrom
fix/calendar/all-day

Conversation

@Marc-Andrieu
Copy link
Member

Description

Summary

Now, day(s)-long events are also displayed as such, on the event module's calendar, on Google Calendar and on iOS iCalendar, AND the start and end dates are correct.

image

Sources

RFC 5545, 3.6.1. Event Component:

The "DTSTART" property for a "VEVENT" specifies the inclusive start of the event. For recurring events, it also specifies the very first instance in the recurrence set. The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event. For cases where a "VEVENT" calendar component specifies a "DTSTART" property with a DATE value type but no "DTEND" nor "DURATION" property, the event's duration is taken to be one day.

Issues/PR dependencies

Issues to be resolved

Fixes #331

Changes Made

  • All-day events are recognized as such on the 3 calendars clients. That was pretty easy
  • There is no gap, shift in days, missing days or extra days. That was not so easy, I had to find the explication in the RFC to be sure of what they did.
  • Classical events are still OK.
  • Resilient to daylight saving time: no matter if your event is scheduled in November or in May, the 3 calendars display the same thing.

Classification

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 🔨 Refactor (non-breaking change that neither fixes a bug nor adds a feature)
  • 🔧 Infra CI/CD (changes to configs of workflows)
  • 💥 BREAKING CHANGE (fix or feature that require a new minimal version of the front-end)
  • 😶‍🌫️ No impact for the end-users

Impact & Scope

  • Core functionality changes
  • Single module changes
  • Multiple modules changes
  • Database migrations required
  • Other: ...

Testing

  • 1. Tested this locally,
    • and importing in my Google Calendar,
    • and asked a iPhone friend to import my local file in iCalendar
  • 2. Added/modified tests that pass the CI (or tested in a downstream fork)
  • 3. Tested in a deployed pre-prod
  • 0. Untestable (exceptionally), will be tested in prod directly

Documentation

  • Updated the docs accordingly :
  • " Docstrings
  • # Inline comments
  • No documentation needed

@Marc-Andrieu Marc-Andrieu self-assigned this Nov 24, 2025
@Marc-Andrieu Marc-Andrieu added ready for review This PR is ready to be reviewed fix bug This PR fix a bug calendar labels Nov 24, 2025
@Marc-Andrieu
Copy link
Member Author

Also fixed the typo: the name is PRODID (Product Identifier) not PROID, and the value should be RFC 5545 compliant (section 4.7.3)

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.19%. Comparing base (a683ea8) to head (2c87993).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #906       +/-   ##
===========================================
- Coverage   85.91%   50.19%   -35.72%     
===========================================
  Files         193      193               
  Lines       14967    14969        +2     
===========================================
- Hits        12859     7514     -5345     
- Misses       2108     7455     +5347     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@armanddidierjean

This comment was marked as resolved.

@armanddidierjean armanddidierjean merged commit ad1db63 into main Nov 29, 2025
7 of 8 checks passed
@armanddidierjean armanddidierjean deleted the fix/calendar/all-day branch November 29, 2025 11:32
Rotheem pushed a commit that referenced this pull request Dec 19, 2025
# Description

## Summary

<!--BRIEF description: DONT'T EXPLAIN the code: JUSTIFY what this PR is
for!-->

Now, day(s)-long events are also displayed as such, on the event
module's calendar, on Google Calendar and on iOS iCalendar, **AND** the
start and end dates are correct.

<img width="2956" height="606" alt="image"
src="https://github.com/user-attachments/assets/13bdff59-e25e-4fcd-a50b-f73525e97edf"
/>

### Sources

[RFC 5545, 3.6.1. Event
Component](https://datatracker.ietf.org/doc/html/rfc5545#section-3.6.1):

> The "DTSTART" property for a "VEVENT" specifies the inclusive start of
the event. For recurring events, it also specifies the very first
instance in the recurrence set. The "DTEND" property for a "VEVENT"
calendar component specifies the non-inclusive end of the event. For
cases where a "VEVENT" calendar component specifies a "DTSTART" property
with a DATE value type but no "DTEND" nor "DURATION" property, the
event's duration is taken to be one day.


## Issues/PR dependencies

<!--Use a keyword, then #123 for the same repo or
aeecleclair/RepoName#123 for another-->

### Issues to be resolved

<!--Keywords: "closes", "fixes", "resolves" -->
Fixes #331 

## Changes Made

<!--DESCRIBE the changes: tell the BIG STEPS, use a CHECKLIST to show
progress. You can explain below how the code works.-->

- [x] All-day events are recognized as such on the 3 calendars clients.
That was pretty easy
- [x] There is no gap, shift in days, missing days or extra days. That
was not so easy, I had to find the explication in the RFC to be sure of
what they did.
- [x] Classical events are still OK.
- [x] Resilient to daylight saving time: no matter if your event is
scheduled in November or in May, the 3 calendars display the same thing.

<!--Don't touch thses two tags-->
<details>
<summary>

# Classification

</summary>

## Type of Change

- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 🔨 Refactor (non-breaking change that neither fixes a bug nor adds
a feature)
- [ ] 🔧 Infra CI/CD (changes to configs of workflows)
- [ ] 💥 BREAKING CHANGE (fix or feature that require a new minimal
version of the front-end)
- [ ] 😶‍🌫️ No impact for the end-users

## Impact & Scope

- [ ] Core functionality changes
- [x] Single module changes
- [ ] Multiple modules changes
- [ ] Database migrations required
- [ ] Other: ... <!--Not module-oriented: write something!-->

## Testing

- [x] 1. Tested this locally,
  - [x] and importing in my Google Calendar,
  - [x] and asked a iPhone friend to import my local file in iCalendar
- [ ] 2. Added/modified tests that pass the CI (or tested in a
downstream fork)
- [ ] 3. Tested in a deployed pre-prod
- [ ] 0. Untestable (exceptionally), will be tested in prod directly

## Documentation

- [ ] Updated [the docs](docs.myecl.fr) accordingly : <!--[Docs#0 -
Title](https://github.com/aeecleclair/myecl-documentation/pull/0)-->
- [x] `"` Docstrings
- [ ] `#` Inline comments
- [ ] No documentation needed

</details>

---------

Co-authored-by: Armand Didierjean <95971503+armanddidierjean@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

calendar fix bug This PR fix a bug ready for review This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ical days long events are not considered as such

2 participants