Implemented: New TWiki::Func::formatTime Function to Format Time into a String
formatTime( $time, $format, $timezone ) ==> $text
| Description: |
Format the time in seconds into the desired time string |
Parameter: $time |
Time in epoc seconds |
Parameter: $format |
Format type, optional. Default e.g. " TWiki::Plugins::VERSION 1.010 (31 Dec 2002) - 19:30", can be "iso" (e.g. "2002-12-31T19:30Z"), "rcs" (e.g. "2001/12/31 23:59:59", "http" for HTTP header format (e.g. "Thu, 23 Jul 1998 07:21:56 GMT") |
Parameter: $timezone |
either not defined (uses the displaytime setting), "gmtime", or "servertime" |
Return: $text |
Formatted time string |
| Note: |
if you used the removed formatGmTime, add a third parameter "gmtime" |
| Since: |
TWiki::Plugins::VERSION 1.020 (26 Feb 2004) |
--
SvenDowideit - 26 Feb 2004
Discussions
Added docs of feature added on 26 Feb 2004 by
SvenDowideit.
--
PeterThoeny - 29 Aug 2004
I was hoping to add yet another format: age, or time difference. Sometimes all you need is how
old most recent change is - if it is minutes or hours, display age in munutes/hours. If it is old (days), display date, without hours.
--
PeterMasiar - 31 Aug 2004