I experience an unexpected behaviour when creating a recurrence rule in ical4j(3.2.3).
I am quite new to ical4j but I have already looked into https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10, which was quoted in another question here: https://stackoverflow.com/a/7800560/19390104. I can't find a solution, though.
The aim is to create one meeting per month on a specific weekday. The first date should be the next according weekday and the next date one month later.
Let me give an easy example:
Start Date: 06-22-2022. Weekday: Wednesday. The meeting should be monthly repeated for 3 times.
The expected outcome would be: [06-22-2022, 07-20-2022, 08-17-2022].
To achieve this, I tried the following recurrence rule: "FREQ=MONTHLY;BYDAY=WE;COUNT=3"
The actual outcome looks the following: [06-22-2022, 06-29-2022, 07-06-2022]. So it seems that the monthly frequency is actually ignored and the recurrence is based on a weekly frequency, when the BYDAY recur rule is used.
Can somebody help me and tell me, why the monthly frequency is ignored and how I should design a recurrence rule which works for the desired use case?
Update: I got the correct result by using a weekly frequency, every 4 weeks.
Could it be, that the monthly recurrence on a weekday does only work, when a specific week is defined? So that ical4j knowns, in which week the monthly pattern should be repeated?
For example: "FREQ=MONTHLY;BYDAY=4WE;COUNT=3" for every 4th wednesday in the month (which returns a different result that just counting the amount of weeks from the first date, though)?