Task #51628

Precise date calculation for stdWrap.age

Added by Tomita Militaru about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2013-09-01
Due date:
% Done:

0%

TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

There's an issue when calculating in years because it presumes that a year has always 365 days, more details can be read here:
http://forge.typo3.org/issues/20016

A suggestion from Phillip Gampe:
... should refactor the method to use DateTime->diff(), which should be accurate, but does only exists for PHP 5.3. Thus it cannot go into 4.5.
@see http://stackoverflow.com/a/3923228/1234469
I would even suggest that you turn this "bug" into a TASK and we submit this only to 6.2 with the subject "Precise date calculation for stdWrap.age". This should be covered with unit tests of course (which in this case a really simple, because we do not need mocking).


Related issues

Related to TYPO3 Core - Task #20016: wrong age calculating in stdWrap New 2009-02-13

History

#1 Updated by Alexander Opitz about 6 years ago

  • Status changed from New to Closed

Duplicate of Bug #20016

Also available in: Atom PDF