StaticMethod formatDelta ($s) -> $stringFormat a time in seconds as a string. For example, "1 day, 3 hours, 2 minutes, 6 seconds"StaticMethod parseInterval ($szInterval) -> [$iSecs,$iSecs]Convert string representing a time interval to a pair of integers representing the amount of seconds since epoch for the start and end extremes of the time interval.
interval ::= date { $$.start = fillStart($1); $$.end = fillEnd($1); }
| date '/' date { $$.start = fillStart($1); $$.end = fillEnd($3); }
| 'P' duration '/' date { $$.start = fillEnd($4)-$2; $$.end = fillEnd($4); }
| date '/' 'P' duration { $$.start = fillStart($1); $$.end = fillStart($1)+$4; }
;
an interval may be followed by a timezone specification string (this is not supported yet).
duration has the form (regular expression):
P(<number><nameOfDuration>)+nameOfDuration may be one of:
date follows ISO8601 and must include hypens. (any amount of trailing
elements may be omitted and will be filled in differently on the
differents ends of the interval as to include the longest possible
interval):
|
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. All other trademarks are the property of their respective owners. Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiTimeDotPm
Powered by TWiki/Dakar
Wed, 08 Feb 2006 build 8740
|
||||||||||||||||||||||||||||||||||||