-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: Time::getAge() calculation #6159
Conversation
The magic property cannot find the test cases from the source of the Time::getAge() definition on IDE.
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.
Why not use Time::difference()
? Or it's underlying method:
return $time->fieldDifference($this->testTime, IntlCalendar::FIELD_YEAR);
Refactored. |
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.
Test failures seemed to be due to CloudFlare's outage affecting Coveralls, not a problem.
Thank you @kenjis |
Description
Time::getAge()
calculationThere are a few ways to calculate human age.
However, the current implementation does not seem to be common.
E.g.:
Checklist: