-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat(DateTime) Provide a human-like months substract and add system #477
Conversation
Pull Request Test Coverage Report for Build 9417866510Details
💛 - Coveralls |
a0ce49f
to
932a6b3
Compare
Pull Request Test Coverage Report for Build 9418018792Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9418010142Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9418039594Details
💛 - Coveralls |
(The mutation tests nor failing windows unit test seem related to this PR) |
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.
LGTM! just nitpicking 😅
80894ad
to
5094253
Compare
Pull Request Test Coverage Report for Build 9427230862Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9427239203Details
💛 - Coveralls |
5094253
to
739e0e6
Compare
Pull Request Test Coverage Report for Build 9437924640Details
💛 - Coveralls |
$minus_years = Math\div($months, 12); | ||
$months_left = $months - ($minus_years * 12); |
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.
todo: 12
should be replaced with MONTHS_PER_YEAR
( just in case humanity decided to change the calender, so we have less work todo 😛 )
As mentioned in
DateTime
component #446 (comment)DateTime
component #446 (comment)This PR introduces a way of adding and subsctracting months that is more in line with how you would do it as a human, rather than a computer.
I know you told me a few times:
However, I hope you consider taking this approach when it's just a "merge" button click away :)