Clean up duplicated code in calcAge
implement calcAge() method, which is almost exact copy.
We should refactor it by moving the method to some utility class.
#4 Updated by Bernhard Kraft over 6 years ago
- Status changed from Closed to New
The linked issue is in not really a solution for this problem. I rather addresses wrong age calculation. While this one addressed the code duplication.
I created a patch (review) which fixes the code duplication by also creating a "DateTimeUtility" class.
But no algorithms were changed. Only refactoring.
I guess if the review is merged the other patch changing the behaviour could get implemented easier.