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.
$szInterval - time interval string
in yacc syntax, grammar and actions:
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):
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):
2001-01-01T00:00:00
2001-12-31T23:59:59
timezone is optional and not supported yet.
If the format is not recognised, will return empty interval [0,0].
TODO: timezone
testing, especially on non valid strings