-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix semiannually and semimonthly period calculations #3272
Conversation
b69d819
to
e7e9f14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow template for PRs and in it describe what is wrong with the current behavior and what the proposed new behavior is
e7e9f14
to
e8cbab3
Compare
I will write a couple of unit tests for semimonthly and semiannually, as they are the most complicated ones. |
b547063
to
88d38b2
Compare
88d38b2
to
601b6b7
Compare
b394571
to
bc9825e
Compare
bc9825e
to
1a74a4b
Compare
1a74a4b
to
dc5a11e
Compare
Also fix a month number bug, months starts from 0
Also do the semiannually calculation with 6 months instead of 2 quarters
be9356a
to
5b7b912
Compare
Obviously anet.yml doesn't need change, but anet-dictionary.yml does (we need to update the PR template) |
"semiannualy" and "semimonthly" periods were calculated incorrectly, this pr fixes those.
For "semiannualy", previous code would produce an incorrect period if you are at 2nd or 4th quarters currently:
Example input: date = 30 October ( It shouldn't start from Octobers or Aprils, only 1 Jan or 1 July)
For "semimonthly", it is also incorrect, same input date, it misses first half of the months completely:
Fixed versions' behaviour:
User changes
Super User changes
Admin changes
System admin changes
Checklist
repo#issue: Title
title format and these 7 rules