Project

General

Profile

Actions

Task #51628

closed

Precise date calculation for stdWrap.age

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

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

0%

Estimated time:
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 1 (1 open0 closed)

Related to TYPO3 Core - Task #20016: wrong age calculating in stdWrapNewAlexander Opitz2009-02-13

Actions
Actions

Also available in: Atom PDF