apognu / gocal

ICS file parser in Golang
MIT License
77 stars 24 forks source link

RRULE with COUNT=1 .... but FREQ=WEEKLY and BYDAY=MO,TU,WE,TH,FR #21

Closed codemac closed 2 years ago

codemac commented 2 years ago

Thank you so much for this library. Really addresses many issues I have with ics, and is very easy to use!

There is a bug in how COUNT is used in WEEKLY repeating events afaict, and I wanted to see what you thought.

I received an event recently that expanded by your library differently than it did in outlook & apple calendar:

RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=1;BYDAY=MO,TU,WE,TH,FR;WKST=SU

This event expanded by outlook & apple calendar to only one event on a Monday due to the COUNT argument. I don't know /why/ this ICS event got created this way... but your library expands this out to repeating monday, tuesday, wednesday, thursday, friday forever.

I'm trying to follow your logic in /rrule.go but I don't understand it very well to make a suggestion patch just yet.

codemac commented 2 years ago

I'm going to create a test case with the event ics and see what happens.

codemac commented 2 years ago

Nevermind! My unit test is passing, so I think I just have a bug on my end.