jkbrzt / rrule

JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
https://jkbrzt.github.io/rrule
Other
3.27k stars 506 forks source link

how can i get the `all after` occurence? #559

Closed smallst closed 1 year ago

smallst commented 1 year ago

Reporting an issue

Thank you for taking an interest in rrule! Please include the following in your report:

i found. rrule has all() to get all occurence. before() and after() to get only 1 occurence. then if i had a rrule like {dtstart: new Date('2022-01-01'), freq: WEEKLY, count: 50} and i want to know how many occurence is there after new Date('2022-03-01'), i can only call all() and filter it by myself? since between() requires before & after at the same time, while i don't know the endDate of the rrule. maybe i need to use all() and get last item? anyway i could get all after but seems not so convenient. can we add something like between with default start & end or first last like https://github.com/jakubroztocil/rrule/pull/422 so that rrule can be more convenient?

smallst commented 1 year ago

seems no response. i use the all().filter() by myself finally.