rrule icon indicating copy to clipboard operation
rrule copied to clipboard

Incorrect return type for RRule.after

Open jkepps opened this issue 3 years ago • 1 comments

RRule.after docs say that it returns Date or null, but the function definition specifies only Date. The function will return null if there are no dates in the recurrence after the given parameter, so the function does indeed return Date or null. The function definition should be updated to specify the correct return type.

The repro steps are fairly straightforward. Instantiate a new rrule object with a recurrence in the past. Invoke the after method with a date that's in the future. The function will return null.

  • [x] Verify that you've looked through existing issues for duplicates before creating a new one
  • [ ] Code sample reproducing the issue. Be sure to include all input values you are using such as the exact RRule string and dates.
  • [x] Expected output
  • [x] Actual output
  • [x] The version of rrule you are using
  • [ ] Your operating system
  • [ ] Your local timezone (run $ date from the command line of the machine showing the bug)

jkepps avatar Nov 25 '22 18:11 jkepps

I believe this should have been closed after #561

ghost avatar Sep 13 '24 07:09 ghost