s := []string{"DTSTART;20100123T100000Z", "RRULE:FREQ=YEARLY"}
set, err := rrule.StrSliceToRRuleSet(s)
if err != nil {
log.Fatal(err)
}
after := time.Date(2010, time.January, 23, 10, 0, 0, 0, time.UTC)
before := time.Date(2012, time.January, 23, 10, 0, 0, 0, time.UTC)
fmt.Printf("%+v\n", set.Between(after, before, true))
Output using rrule-go@v1.5.0: [2010-01-23 10:00:00 +0000 UTC 2011-01-23 10:00:00 +0000 UTC 2012-01-23 10:00:00 +0000 UTC]
Output using rrule-go@v1.6.0: [2010-01-23 10:00:00 +0000 UTC 2011-01-13 10:00:00 +0000 UTC 2011-01-23 10:00:00 +0000 UTC 2012-01-13 10:00:00 +0000 UTC 2012-01-23 10:00:00 +0000 UTC]
With the latest release, we are now observing some events within 10 days of each other when using FREQ=YEARLY.
Go Version:
1.15.2
Test Case:Output using rrule-go@v1.5.0:
[2010-01-23 10:00:00 +0000 UTC 2011-01-23 10:00:00 +0000 UTC 2012-01-23 10:00:00 +0000 UTC]
Output using rrule-go@v1.6.0:[2010-01-23 10:00:00 +0000 UTC 2011-01-13 10:00:00 +0000 UTC 2011-01-23 10:00:00 +0000 UTC 2012-01-13 10:00:00 +0000 UTC 2012-01-23 10:00:00 +0000 UTC]
With the latest release, we are now observing some events within 10 days of each other when using
FREQ=YEARLY
.