I was building a calendar in react-native and notices something strange
When i run this on iOS
console.log(
rrulestr('FREQ=DAILY;DTSTART=20180416T070000Z;INTERVAL=2;WKST=MO')
.between(
new Date("2018-10-24T22:00:00.000Z"),
new Date("2018-11-03T00:00:00.000Z")
)
)
I got the following:
Array [
2018-10-25T07:00:00.000Z,
2018-10-27T07:00:00.000Z, <--
2018-10-28T08:00:00.000Z, <--
2018-10-30T08:00:00.000Z,
2018-11-02T08:00:00.000Z,
]
Where as i run it in console over at https://jakubroztocil.github.io/rrule/
i got a more correct result:
Array [
2018-10-25T07:00:00.000Z,
2018-10-27T07:00:00.000Z, <--
2018-10-29T08:00:00.000Z, <--
2018-10-31T08:00:00.000Z,
2018-11-02T08:00:00.000Z,
]
I'm using rrule v2.2.9
everything else did look correct from 2018-04-16 upon till this point
Even run this in the npm playground: https://runkit.com/embed/1lgceq9e7rm0
Think it might be related to https://github.com/jakubroztocil/rrule/issues/157
using @2.2.0 instead of @2.2.8 works
We ran into this issue also. The problem seems to be caused by the daylight saving shift in November. Downgrading to @2.2.0 from @2.2.9 worked for us too.
I got wrong dates as well with @2.2.9 When setting frequency to weekly and weekday to thursday I got dates that were on wednesdays! Switching back to @2.2.0 worked for me.
I'm in GMT+2 (Middle Europe, daylights saving)
Same here, timezone GMT+3(summertime Kyiv/Ukraine)
Same rule: FREQ=WEEKLY;BYDAY=FR;DTSTART=20180713T060000Z;UNTIL=20180727T060000Z
returns different results in Firefox and Chrome, where Chrome seems taking BYDAY=BYDDAY-1
Fallback from 2.2.9 to 2.2.0 fix the issue
@jimmywarting @chrishanyu @scoutkirkolson @pzhuk I believe this has been fixed in 2.3.3. Please reopen if you continue to have any issues.
We experienced this issue and reverting to 2.2.0 fixed it
Most helpful comment
using @2.2.0 instead of @2.2.8 works