Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating repeating events #442

Closed
arnim279 opened this issue Nov 26, 2022 · 9 comments
Closed

Floating repeating events #442

arnim279 opened this issue Nov 26, 2022 · 9 comments

Comments

@arnim279
Copy link

There are some problems with floating, repeating events.
Currently, a floating, repeating event looks like this:

BEGIN:VEVENT
...
DTSTART:20221125T082500
DTEND:20221125T091000
RRULE:FREQ=WEEKLY;UNTIL=20230726T082500Z
EXDATE:20230224T082500Z,20230106T082500Z
SUMMARY:Event Title
END:VEVENT

As you can see, the DTSTART and DTEND datetimes are 'floating', so they don't end with the Z UTC time zone specifier.
The RRULE:UNTIL and EXDATE properties however are still treated as UTC datetimes. In my case, the RRULE:UNTIL property is not affected, but I imagine in some edge cases it could be. My main issue is with the excluded dates. To properly exclude an event from the recurrence set, the excluded time must match the DTSTART time. This does not work if that time is 'floating'.

This is the affected code (the dateonly and floating parameters to formatDate() are always undefined).

The solution would be to

  • allow floating excluded datetimes or to
  • allow specifying excluded dates (EXDATE;VALUE=DATE=[list of date])

I might be wrong about the details however, I don't have a lot of experience in working with ICal.

@sebbo2002
Copy link
Owner

Sorry for the late reply, had a cold in between and only now got to look through the GitHub notifications.

As I see it, this is a bug, since both UNTIL and EXDATE should contain floating dates. Am I seeing this correctly?

@arnim279
Copy link
Author

arnim279 commented Dec 5, 2022

No worries for taking a bit longer, I hope you're better now!

Based on my knowledge of iCal I do think that your library should support floating UNTIL and EXDATE properties, since the following file works as I expected when imported into Apple Calendar.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//arnim279/demo
BEGIN:VEVENT
SUMMARY:Test Event
UID:1
DTSTAMP:20221206T120000
DTSTART:20221206T120000
DTEND:20221206T130000
RRULE:FREQ=WEEKLY;COUNT=4
EXDATE:20221213T120000
END:VEVENT
END:VCALENDAR

I am however pretty unsure whether this is the behavior intended in the iCal RFC, because I can't find any mention of floating EXDATE values in the sections for date-time values or for exdates.
I'll try to see if I can find out more, I want to make sure this behavior is even compliant with the standard before asking for a change.

@sebbo2002
Copy link
Owner

I'll try to see if I can find out more, I want to make sure this behavior is even compliant with the standard before asking for a change.

Have you been able to find out anything in the meantime? I haven't so far, to be honest.

@arnim279
Copy link
Author

I haven't found anything either, but because both the icalendar validator and Apple Calendar accept my example I guess it's fine?

@sebbo2002
Copy link
Owner

I would also just assume that it is. If it is wrong and it breaks on a client, hopefully someone will report in the issues.

I would take care of an implementation if it is not urgent for you. But it can happen in the new year, I can not currently estimate when I come to it. Because of the holidays etc.

@sebbo2002 sebbo2002 mentioned this issue Dec 20, 2022
github-actions bot pushed a commit that referenced this issue Dec 20, 2022
## [3.6.1-develop.3](v3.6.1-develop.2...v3.6.1-develop.3) (2022-12-20)

### Bug Fixes

* **Event:** Return floating repeating until/excluded dates if floating ([011123e](011123e)), closes [#442](#442)
@sebbo2002
Copy link
Owner

🎉 This issue has been resolved in version 3.6.1-develop.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sebbo2002
Copy link
Owner

@arnim279 I released a pre-release with the change. Can you check if it's now fixed for you? You can install the latest pre-release with npm i ical-generator@next.

@arnim279
Copy link
Author

arnim279 commented Dec 20, 2022

Yup, it works now! Thanks for the quick implementation :D

Edit: In a rush I forgot to install the pre-release, simply reproduced the bug, and wrote another comment here but I deleted it when I noticed, so don't be surprised if you got two notifications

sebbo2002 added a commit that referenced this issue Dec 27, 2022
github-actions bot pushed a commit that referenced this issue Dec 27, 2022
## [3.6.1](v3.6.0...v3.6.1) (2022-12-27)

### Bug Fixes

* **Event:** Return floating repeating until/excluded dates if floating ([011123e](011123e)), closes [#442](#442)
@sebbo2002
Copy link
Owner

🎉 This issue has been resolved in version 3.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants