https://bugzilla.wikimedia.org/show_bug.cgi?id=32545
--- Comment #1 from Brion Vibber <br...@wikimedia.org> 2011-11-22 01:34:03 UTC --- Current w3c draft HTML 5 spec for <time>: <http://dev.w3.org/html5/spec/text-level-semantics.html#the-time-element> A few things to consider in context of bug 19992 (using this to do localized time/datestamps using browser's client-side knowledge of user's timezone): * if a 'datetime' attribute is present with the normalized timestamp, it's used as the date and/or time value -- thus the text contents may be freely formatted (or re-formatted) * there's no standard for replacing visible times, so we'd probably want to use a class to mark localizable items * the valueAsContent property doesn't distinguish between 'date only' and 'midnight UTC on that date', nor between 'time specified to the second at :00' and 'time specified to the minute'; could need to check the format or something to determine partial replacements * note that applying timezone transformations to a UTC-midnight date timestamp may result in jumping off by a day depending on your local timezone -- probably not usually what's wanted. * <time> will be theoretically relevant as metadata on things that you would probably not actually want to display localized in a user's timezone, for instance at <https://en.wikipedia.org/wiki/JFK#Assassination>: "President Kennedy was assassinated in Dallas, Texas, at 12:30 pm [[Central Standard Time]] on November 22, 1963, ..." this is relevant metadata and might be marked up something like: "President Kennedy was assassinated in Dallas, Texas, at <time datetime='1963-11-22T12:30-06:00'>12:30 pm [[Central Standard Time]] on November 22, 1963</time>, ..." meanwhile in UI and project coordination we're more likely to want to make them localizable: "The IRC meeting will start at <time datetime='2011-11-25T12:00Z'>12:00 UTC on November 25</time>" ... but how will the system know we want to convert this one, and not the other one? Need a class? What about the contents? Would we lose that nice custom formatting there? Would we say 'too bad' and actually mark it up a little differently? One possibility might be to have a wrapper parser function or template: "The IRC meeting will start at {{#showtime:2011-11-25T12:00Z}}" which might render to HTML: "The IRC meeting will start at <time class='mw-showtime' datetime='2011-11-25T12:00Z'>2011-11-25 12:00 UTC</time>" when then gets replacements done via JS into local time: "The IRC meeting will start at <time class='mw-showtime' datetime='2011-11-25T12:00Z'>2011-11-25 04:00 PST</time>" Code could emit the HTML w/ class markers directly when not going through wikitext... -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l