[uf-new] hAudio duration syntax
msporny at digitalbazaar.com
Mon Oct 15 15:14:11 PDT 2007
Scott Reynen wrote:
>> The complete representation of the expression for duration in the
>> alternative format is as follows:
>> Basic format: PYYYYMMDDThhmmss or PYYYYDDDThhmmss
>> Extended format: PYYYY-MM-DDThh:mm:ss or PYYYY-DDDThh:mm:ss
> That section also includes several references to other sections defining
> date and time formats, including "reduced accuracy" formats (i.e.
> removing segments with values of zero). So I believe "PT04:46" is a
> valid ISO 8601 duration.
I still don't think it is, Scott. After reading through the spec, I am
getting the impression that "reduced accuracy" means the trailing digits
(the more accurate ones, such as seconds and minutes), not the leading
digits (the less accurate ones, such as hour), can be avoided. To quote
the spec (Section 188.8.131.52):
"For reduced accuracy or decimal representations of this representation,
the following rules apply.
a) If necessary for a particular application, the lowest order
components may be omitted to represent duration with reduced accuracy."
The following is ambiguous without a specific interpretation (which is
included in the specification):
Is that 4 hours and 46 minutes, or 4 minutes and 46 seconds? If I'm
interpreting the spec correctly, it is the prior - 4 hours and 46
minutes. The following would be the correct use of ISO-8601 for the
example you gave:
> Martin McEvoy wrote:
> Duration Is not however expressed in seconds
> unless you had something that was 0 minutes 46 seconds
I think you are correct Martin... apologies for the crappy markup.
Clearly, I didn't understand the nuances of ISO-8601 until just recently :)
More information about the microformats-new