2

I'm using rrule to work with recurrence tasks.

Everything works fine (like expected), except when I use the between method. I want to get the only the instances between today and tomorrow from this string rule

const stringRule = "DTSTART:20200515T163000Z RRULE:FREQ=DAILY;COUNT=5;INTERVAL=1;WKST=MO" let ruleobj = rrules.rrulestr(stringrule); let instances = ruleobj.between(new Date(Date.UTC(2020, 5, 19)), new Date(Date.UTC(2020, 5, 20)) );

The method ruleobj.all returns all instances for this stringrule.

"instances": [ "2020-05-15T16:05:00.000Z", "2020-05-16T16:05:00.000Z", "2020-05-17T16:05:00.000Z", "2020-05-18T16:05:00.000Z", "2020-05-19T16:05:00.000Z", "2020-05-20T16:05:00.000Z" ]

So, the between method should be return

["2020-05-19T16:05:00.000Z", "2020-05-20T16:05:00.000Z"]

but return []

Yeah, I can filter the filter instances (Actually I did), but... How does the method work?. Why return empty?

makitocode
  • 938
  • 1
  • 16
  • 40

0 Answers0