Skip to content
  • Alexander Opitz's avatar
    [TASK] Rebuild the calcAge functionality · 98c0ff71
    Alexander Opitz authored
    We have two calcAge functions with same functionality and same issues.
    So this is moved to a new DateTimeUtility class and deprecated in the
    the original classes. Also time functions from GeneralUtility are moved
    to the new class.
    
    Following issues are resolved:
    * Age calculation does not respect leap years.
    * Age calculation may round up so something seams older than it is.
    * Between days and years there are months missing, so we get now 2 months
      instead of 60 days.
    
    Resolves: #20016
    Releases: 6.3, 6.2
    Change-Id: Ie323f30b1fb97b68f89d43605ccda67f219a965a
    Reviewed-on: https://review.typo3.org/24635
    Reviewed-by: Markus Klein
    Tested-by: Markus Klein
    98c0ff71