cocktail
cocktail copied to clipboard
Understanding `Cocktail.Schedule.t` recurrence_rules
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
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 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" 😄