Tags:
create new tag
, view all tags

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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2004-08-31 - PeterMasiar
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.