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

:except not working as expected #25

Open
wbasmayor opened this issue Aug 31, 2016 · 0 comments
Open

:except not working as expected #25

wbasmayor opened this issue Aug 31, 2016 · 0 comments

Comments

@wbasmayor
Copy link

Scenario

r = Recurrence.new( {:interval=>3, :starts=>Wed, 31 Aug 2016, :until=>Mon, 31 Oct 2016, :except=>[Sat, 03 Sep 2016, Sun, 04 Sep 2016, Sat, 10 Sep 2016, Sun, 11 Sep 2016, Sat, 17 Sep 2016, Sun, 18 Sep 2016, Sat, 24 Sep 2016, Sun, 25 Sep 2016, Sat, 01 Oct 2016, Sun, 02 Oct 2016, Sat, 08 Oct 2016, Sun, 09 Oct 2016, Sat, 15 Oct 2016, Sun, 16 Oct 2016, Sat, 22 Oct 2016, Sun, 23 Oct 2016, Sat, 29 Oct 2016, Sun, 30 Oct 2016]})

Note: The :except dates are basically excluding all saturday and sunday.

Expected Dates:
Aug 31, Sept 5, Sept 8, Sept 13

Results:
Aug 31, Sept 6, Sept 9, Sept 12

If you can see, it got messed up during Sept 5 instead appearing on Sept 6.

Aug 31 is wednesday so on the 3rd day excluding sat sun should have been Sept 5.

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