Issue Task Closed

#51628Precise date calculation for stdWrap.age

Tomita Militaru 09/01/13, 15:39 updated 09/02/13, 15:54

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).@

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.