one more response to your duration syntax survey

I hope you don't mind getting yet another response, and I hope I am not
harming the Web by wasting your time ;)

Thoughts/Rationale:

* As a non-native English speaker, I find "h" for hours, "m" for minutes
and so on a bit unfamiliar. I would prefer a way that allows the more
common [hh]:[mm]:[ss] practice. The ISO 8601 "PT[hh]:[mm]:[ss]" seems
odd too so I guess another attribute for duration as stated on [1] would
work for me, although I can't guarantee if spelling "duration" is
actually easier than using "m" and "s".

Anyway, a string like "3m20s" doesn't show up in real world UI and
"3:20" is obviously more common.

[1] http://wiki.whatwg.org/wiki/Time_element#duration

* For the majority of use cases there will be less than 4 components and
I don't think "1h20m10s" is any less readable than "1h 20m 10s", and
"3m20s" looks better to me than "3m 20s". Therefore, I am against
intervening spaces.

* I am against non-single-letter abbreviations. I don't want to have
trouble thinking which one of "hours" and "hour" is right.

* I would prefer the following heuristic for "month" and "minutes"
disambiguation (for non ISO 8601 string only):
1. For a "m", If there's a "y" before it or there's a "w", "d", "h" or
another "m" after it. Then "m" is for "month" (so you can do "1y3m" or
"1m10d")
2. Otherwise "m" is for "minutes"
(I heard the rumor that Microsoft uses "M" for month and "m" for
minutes, so I guess this needs some input from them)

* I don't yet see the value of conformance-parsing mismatch here and I
don't know who'll implement "parse a duration string" either. I'll mark
non-conforming duration string as having no meaning for now.

Results (my results in parenthesis):

<time datetime="P1MT1M">
Conformance: yes, conforming
Meaning: 1 month, 60 seconds


<time datetime="P.1S">
Conformance: no, found "." where expected digit
Meaning: none

<time datetime="P1 S">
Conformance: no, unexpected white space
Meaning: 1 second (noneļ¼‰


<time datetime="1H">
Conformance: yes, conforming
Meaning: 3600 seconds

<time datetime="1 H">
Conformance: yes, conforming (no, unexpected white space)
Meaning: 3600 seconds (none)

<time datetime="1h">
Conformance: yes, conforming
Meaning: (3600 seconds)

<time datetime="1 h">
Conformance: yes, conforming (no, unexpected white space)
Meaning: (none)

<time datetime="1HOUR">
Conformance: (no, more than one letter)
Meaning: (none)

<time datetime="1hour">
Conformance: (no, more than one letter)
Meaning: (none)


<time datetime="1D1H">
Conformance: yes, conforming
Meaning: 90000 seconds

<time datetime="1D 1H">
Conformance: (no, unexpected white space)
Meaning: (none)

<time datetime="1 D 1 H">
Conformance: (no, unexpected white space)
Meaning: (none)


<time datetime="1mo1min">
Conformance: yes, conforming (no, more than one letter)
Meaning: 1 month, 60 seconds (none)

<time datetime="1mon">
Conformance: (no, more than one letter)
Meaning: (none)

<time datetime="1min">
Conformance: (no, more than one letter)
Meaning: (none)

<time datetime="1mont">
Conformance: (no, more than one letter)
Meaning: (none)

<time datetime="1minutes">
Conformance: (no, more than one letter)
Meaning: (none)

<time datetime="1Y1M">
Conformance: (yes, conforming)
Meaning: (13 months)

<time datetime="1H1M">
Conformance: (yes, conforming)
Meaning: (3660 seconds)


Cheers,
Kenny

Received on Friday, 18 November 2011 14:23:12 UTC