Fix daily rule occurrences #25

Merged
merged 1 commit into from Aug 24, 2011

Conversation

Projects
None yet
2 participants
Contributor

benfyvie commented Aug 24, 2011

Fixed daily rule so that occurrences can properly continue on into a new year.

Previously #yday was being used in math operations but this caused issues because two odd yday numbers can occur back to back:

Date.parse('2011-12-31').yday
=> 365
Date.parse('2012-1-1').yday
=> 1

I also noticed a comment of "TODO repair" on line 5 of daily_rule.rb, I'm not sure of the purpose of the comment but you may want to remove it if my fix is the "repair".

@seejohnrun seejohnrun merged commit 18a7d3b into seejohnrun:master Aug 24, 2011

Owner

seejohnrun commented Aug 24, 2011

Thanks so much for this. I've removed the TODO and merged the pull request. This will be part of the next release, either tonight or tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment