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

Infinite loop with byweekno #157

Open
karam12 opened this issue Jan 8, 2019 · 1 comment
Open

Infinite loop with byweekno #157

karam12 opened this issue Jan 8, 2019 · 1 comment

Comments

@karam12
Copy link

karam12 commented Jan 8, 2019

This rule makes an infinite loop :
"FREQ=WEEKLY;UNTIL=20200101T000000;INTERVAL=1;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYWEEKNO=3,5,7"

But, if you remove the "BYWEEKNO=3,5,7", then it works.
"FREQ=WEEKLY;UNTIL=20200101T000000;INTERVAL=1;BYDAY=SU,MO,TU,WE,TH,FR,SA"

Am I doing something wrong or is it a bug ?

@karam12
Copy link
Author

karam12 commented Jan 9, 2019

Well, it's a bug, I found the problem.
In this file : simshaun/recurr/src/Recurr/Transformer/ArrayTransformer.php at line 412
you have to replace this :
$ifByWeekNum = $byWeekNum !== null && !in_array($i, $wNoMask);
by this :
$ifByWeekNum = $byWeekNum !== null && !in_array($dayOfYear, $wNoMask);

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

1 participant