cocktail icon indicating copy to clipboard operation
cocktail copied to clipboard

Understanding `Cocktail.Schedule.t` recurrence_rules

Open yordis opened this issue 3 years ago • 2 comments

Hey folks, I am a bit confused why Cocktail.Schedule.t has a list of recurrence_rules, here https://github.com/peek-travel/cocktail/blob/2b12aa0d8cecb0ef58e08d9dba6d9646f8a4e419/lib/cocktail/schedule.ex#L39

Following this Stackoverflow question: https://stackoverflow.com/questions/38296679/icalendar-spec-rrule-multiple-times it seems that based on https://datatracker.ietf.org/doc/html/rfc5545 specification

"but it SHOULD NOT be specified more than once. The recurrence set generated with multiple "RRULE" properties is undefined."

So technically this suppose to be a single value

yordis avatar May 10 '21 01:05 yordis

Yes, this is a deviation from the spec due to my misunderstanding of it when I first built it. I'm open to having this change, but it would be major breaking change and I use this library in production with multiple rrules per schedule.

doughsay avatar May 11 '21 19:05 doughsay

@doughsay I am curious to know your use case by the way?

I don't have a strong feeling about it, for the most part, I actually need excal if excal implements some parser and uses some structured data as I explained in another comment.

So I would like to learn why you needed multiple rules behind.

Also, since I don't know the history, I would love to learn about cocktail vs excal and how you ended up with two of them.

Sorry for bothering you so much with this, but hopefully your package stay with me for a long time and I don't have to create "yet another same old same package fixing a minor thing" 😄

yordis avatar May 12 '21 02:05 yordis