Re: [whatwg] <time>

Hi Tom,

I think those examples and suggestions all look good. I have one  
correction and one other example.

First the correction

> <time calendar="Mayan" datetime="12-11-10-09-08">A date</time> is  
> printed on the statue
> Printed on the page: "A date is printed on the statue"
> Tool tip shows: "12-11-10-09-08 (Mayan Long Count)"
> In this example, my user agent does not understand the date, and  
> simply display in a non converted way


Here I think the tool tip has to be:

> Tool tip shows: "12-11-10-09-08 (Mayan)"

directly providing the keyword without a localized natural language  
form (as in your example). That is for unsupported calendars the UA  
would simply have to present the raw attribute values in these cases.  
For supported calendars the dates can be formatted and things like  
months, for example, can be presented in a localized manner (January  
for English instead of 01, Janvier for French, etc.).

Another worthwhile example (one you suggest, but don't provide  
specifically) would be to include something like

This occurred on <time calendar="Gregorian" datetime="1882-03-14" />   
on Ellis Island.

where supporting UAs actually include the localized, formatted date  
according to the user defaults.

This occurred on March 14, 1882 on Ellis Island.

A tool tip could still show shows: March 14, 1882 (Gregorian).

Otherwise I'm in complete agreement with the remainder of your message.

Take care,
Rob

On Mar 16, 2009, at 3:10 PM, Tom Duhamel wrote:

> It seems that pretty much everyone agrees on this:
> - Allow the use of an alternate calendar, but only Gregorian is  
> required to be understood by user agents
> - We only require the user agent to display dates; they are free to  
> do more if they like (conversion, ...) but are not required to.
> - Calendar is specified in a new attribute ('calendar' or something  
> similar) and the value of 'datetime' attibute is specified in the  
> calendar specified by that new attribute
> - If 'datetime' attribute is missing, try to interpret the content  
> as an ISO date. User agent could print the content as is, or print  
> in a more friendly way if desired (in case it was successfully read  
> as a valid ISO date).
> - If content is missing, print 'datetime' attribute (in a friendly  
> way, if desired and set by user, or simply as is if unable to do  
> better)
> - If both content and datetime are present, print content on page  
> and show a representation of the date in datetime with a mechanism  
> such as a tool tip
>
> Does the following examples make sense?
>
> [For theses examples, I'm assuming our user agent only follow the  
> bare minimum requirements we are setting as a draft (that is, they  
> only understand Gregorian), I understand that some specialized user  
> agents might (and probably will) perform conversion as set by the  
> user in the preferences (or some other mean) or do anything else  
> they like.
> I am assuming my particular user agent is set to print in American,  
> long format, but of course I expect user agents to display dates in  
> an appropriate way which the user has a control over.]
>
> <time datetime="2009-03-16">Today</time>
> Tool tip shows: "March 16, 2009"
>
> <time calendar="Julian" datetime="0668-05-11">Some date well in the  
> past</time>
> Tool tip shows: "May 11, 668 (Julian)"
> Content could be a Gregorian conversion as performed by an author,  
> or simply the Julian date again, printed in human readable. User  
> agent should print what ever content the author wrote.
>
> <time>2009-03-16</time>
> Printing directly on the page, no tool tip: "March 16, 2009"
>
> <time>Today</time>
> The user agent can't do anything, but print "Today" directly
> Content could be anything the user agent cannot interpret as a date/ 
> time
> Note: This is an invalid use, so this would actually be the default  
> behavior, as I understand.
>
> <time>16 mars 2009</time>
> The user agent could, but is not required to, make an effort to  
> interpret the date and do whatever it likes with it. However, if the  
> date provided cannot be interpreted as ISO 8601 it could simply  
> print the content as is without any change. In this example, if the  
> user agent is able to understand this French date, the tool tip  
> could be "March 16, 2009" (assuming a user agent set to display  
> dates as American long format)
>
> <time calendar="Mayan" datetime="12-11-10-09-08">A date</time> is  
> printed on the statue
> Printed on the page: "A date is printed on the statue"
> Tool tip shows: "12-11-10-09-08 (Mayan Long Count)"
> In this example, my user agent does not understand the date, and  
> simply display in a non converted way
>
>
> Here is a good one:
>
> <time datetime="2009-03-47">A non valid Gregorian date</time>
> What shoud the tool tip reads?
> "March 47, 2009" (print, without validation... which over time could  
> help user agents which do not understand non Gregorian when calendar  
> attribute is set to something other than Gregorian)
> "2009-03-47" (as date is not valid, simply prints original value  
> without any conversion)
> "Invalid Date" (just an error message)
> or just do nothing, since the date is not valid
>
>

Received on Monday, 16 March 2009 21:06:16 UTC