Hello, firstly thanks for the library! Elixir is missing a complete implementation.
I wish to help improve the rrule coverage. In testing a range of icalendar rules I have found a few gaps that I wish to help with. I am by no means a RRULE expert it has an extremely broad set rules.
These will be known to you, BYSETPOS BYMONTHDAY etc.
This is intended to capture an RRULE like FREQ=YEARLY;BYDAY=5MO
test "yearly with days" do
rule = Rule.new(:yearly, days: [{5, :monday}])
|> IO.inspect(label: "state")
|> Rule.init(~U[2025-02-01 07:00:00Z])
assert rule.state.next == ~N[2025-02-03T07:00:00]
rule = Rule.next(rule)
assert rule.state.next == ~N[2026-02-02T07:00:00]
rule = Rule.next(rule)
assert rule.state.next == ~N[2027-02-01T07:00:00]
end
In my investigation my thoughts are that the frequency needs to be passed down into the days.ex validation, I also suspect all of the BY... rules might need to be added to the days.ex? What are your thoughts on this? It might be a significant refactor.
Let me know if you open to PRs to support these features.
Hello, firstly thanks for the library! Elixir is missing a complete implementation.
I wish to help improve the rrule coverage. In testing a range of icalendar rules I have found a few gaps that I wish to help with. I am by no means a RRULE expert it has an extremely broad set rules.
These will be known to you,
BYSETPOSBYMONTHDAYetc.This is intended to capture an RRULE like
FREQ=YEARLY;BYDAY=5MOIn my investigation my thoughts are that the
frequencyneeds to be passed down into the days.ex validation, I also suspect all of theBY...rules might need to be added to the days.ex? What are your thoughts on this? It might be a significant refactor.Let me know if you open to PRs to support these features.