[TYPO3-core] RFC: #14945: Rename t3lib_BEfunc::time and introduce new function

Georg Ringer news at ringerge.org
Wed Jun 30 14:18:47 CEST 2010


Hi,

this is a SVN patch request.

Type: Bugfix, cleanup

Bugtracker references:
http://bugs.typo3.org/view.php?id=14945

Branches: Trunk

Problem:
The function t3lib_BEfunc::time() is used to render the age of a
timestamp in hours and minutes (+ optional seconds). The function should
be called timeAge like the related functions calcAge() and dateTimeAge().

Furthermore it is confusing as there are the functions date() and
datetime() which render a timestamp as time.

The function time() is only used within the class t3lib_BEfunc (checked
the whole core). Additional benefit beside would be to have a function
similiar to date() and datetime() to render a timestamp.

Solution:
Rename the function time() to timeAge and introduce the function time()

Additional information:
* As there is no XCLASS possible within static classes and the function
itself is nowhere else used, I don't see a problem in renaming an
existing function.

* If the patch is accepted, I will do a further RFC to get rid of the
other direct calls to the PHP function date()

Georg
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14945-befunc-time-timeage.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100630/8d738d88/attachment.asc>


More information about the TYPO3-team-core mailing list