Closed bahriddin closed 7 months ago
I am using gem to create repeating calendar events on DB. For that I want to check how many events do I need to create so I am using sth like this:
rrule = RRule::Rule.new("RRULE:FREQ=DAILY;INTERVAL=1") puts rrule.count
When rule doesn't have ending rule it is calculating count using Enumerable.count and it is quite slow to count events between now and max_date (year 9999).
count
For this reason I believe having an interface to check if it has end limit will be handy.
LGTM, thank you!
I am using gem to create repeating calendar events on DB. For that I want to check how many events do I need to create so I am using sth like this:
When rule doesn't have ending rule it is calculating
count
using Enumerable.count and it is quite slow to count events between now and max_date (year 9999).For this reason I believe having an interface to check if it has end limit will be handy.