Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using RRule.after and RRule.between with Hermes JS Engine #603

Open
jakechao-zeal opened this issue Oct 30, 2023 · 1 comment
Open

Using RRule.after and RRule.between with Hermes JS Engine #603

jakechao-zeal opened this issue Oct 30, 2023 · 1 comment

Comments

@jakechao-zeal
Copy link

Reporting an issue

The version of rrule you are using -- 2.7.2
Your operating system -- Windows using Expo SDK 49 w/hermes enabled (react native); I've tried on Expo SDK 47 as well
Your local timezone (run $ date from the command line
of the machine showing the bug) -- Monday, October 30, 2023 4:10:52 PM

Has anyone been able to use rrule successfully with Hermes as the JS engine? I am unable to use rrule.between at all (my program hangs) and when using rrule.after, I always get an invalid NaN date.

Code sample

cosnt rrule = "DTSTART;TZID=America/Los_Angeles:20231101T160000
RRULE:FREQ=WEEKLY;BYDAY=WE"
 const rule = rrulestr(rrule);

 const start = new Date("2023-10-30");
 const end = new Date(start);
 end.setDate(start.getDate() + 14)

 const afterDate = rule.after(new Date(startDate));
const between = rule.between(new Date(start, end);

Expected output:

11/1 and 11/8 instances of the recurring series

Actual output:

Either an invalid date when using rrule.after or program hangs for rrule.between

I believe this is due to the stricter parsing of dates that Hermes uses as per #579 but I'm wondering if there's any workarounds.

@lucy2329
Copy link

I'm having the same issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants