teambition / rrule-go

Go library for working with recurrence rules for calendar dates.
MIT License
310 stars 57 forks source link

Events which last longer than 1 day #28

Closed heldtogether closed 5 years ago

heldtogether commented 5 years ago

Does this library provide any functionality for long events which span multiple days? For example, if my event starts on Monday, lasts 2 days and repeats every 3 days, then calling .Between({tuesday}, {thursday}, true) should return the event which starts on Monday and the event which starts on Thursday.

I'm not hugely familiar with the iCal RFC, so not even sure how this is handled, but this seems like a super useful thing to be able to do. Does this library support it? If not, perhaps I could help adding it?

rickywiens commented 5 years ago

As far as I know this library only implements the recurrence rule spec from the RFC document:

https://tools.ietf.org/html/rfc5545#section-3.8.5.3

That has no concept of an "event duration" and instead, just handles the beginning of each recurrence of the event. You might need to look into another library that implements the entire iCal spec, rather than just the recurrence part. I might be wrong, but this is my understanding of the purpose of this library.