Closed jorgegiro closed 2 years ago
Yes, I think it is being applied incorrectly in this case. If you add a BYMONTH=1 condition, you do get the results you'd expect. Since a BYMONTHDAY condition is being specified, it shouldn't be pulling in the day from the start date and should be expanding it using only the BYMONTHDAY values.
I merged the change. It will be in the next release due out soon.
Hi!
I starting to using the library in order to calculate recurrent dates. And I try to set a Recurrence specifying a frequency of
YEARLY
and only setting a rule ofBYMONTHDAY
. For example, I am trying to calculate:Then, what I expect when
NextInstance(new DateTime(2021, 01, 10), false)
it is called it is a return date2022/01/03
. But instead, it's returning'2022/01/01'
.This is happening because when expanding dates, expand
ByMonthDate
and if its not setByWeekNo
expandsByDay
even it's not set anyByDay
rule. This cause, that aRecurDateTimeCollection
is genarated containing the date2022/01/01
and is included as an instance.Please, Could you confirm if this is the right behaviour? Or may be
NextInstance
should return2022/01/03
? Or may be I am setting something wrong. It's also possible đŸ˜…