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

Add wholeMonths interval to weeksOfMonthByDay #46

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

anthonywoodard
Copy link

As an addition to the closed issue #10, the wholeMonths interval adds
the ability to choose every nth months to the weeksOfMonthByDay
interval.

As an addition to the closed issue c-trimm#10, the wholeMonths interval adds
the ability to choose every nth months to the weeksOfMonthByDay
interval.
@@ -27,8 +27,12 @@
}
}

if (measure !== 'wholeMonths') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indentation seems wrong.

@bramski
Copy link
Collaborator

bramski commented Jan 8, 2016

Looks great. Please do a bit of reorganization.

Created a function to calculate the diff for intervals.
Created a validateRule method that is used when trying to set a rule.
Removed .toLowerCase() method when creating an interval.
Fixed indentation issue.
Changed wholeMonth to wholeMonths.
Use subtraction instead of difference to calculate wholeMonths.  For
this purpose difference sometimes returns inaccurate values since it
rounds the number down.
@anthonywoodard
Copy link
Author

anthonywoodard commented Jun 19, 2018 via email

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

Successfully merging this pull request may close these issues.

2 participants