[whatwg] Historic dates in HTML5
Here are some (randomly selected) examples of microformats that are already being used to mark up historical dates in wikipedia, of the kind that would be illegal for 2 reasons; firstly, because they are not in the future, and also because they aren't precise (eg full -MM-DD format) or are ancient. http://en.wikipedia.org/wiki/Public_Worship_Regulation_Act_1874 http://en.wikipedia.org/wiki/Septennial_Act_1715 http://en.wikipedia.org/wiki/George_Washington_Carver http://en.wikipedia.org/wiki/John_Everett_Millais (birth date in hCard) 1066 has one hCalendar, with: SPAN class=summary dtstart1066/SPAN : http://en.wikipedia.org/wiki/1066 In my opinion, in order for the time element to succeed, it must be capable of doing the same job as microformats, or - as Henri says - the time element will not succed. Andy Mabbett has already listed use cases http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-February/018639.html Use-cases for machine-readable date mark-up are many: as well as the aforesaid calendar interactions, they can be used for sorting; for searching (find me all the pages about events in 1923 — recent developments in Yahoo's YQL searching API (which now supports searching for microformats): http://developer.yahoo.net/blog/archives/2009/01/yql_with_microformats.html have opened up a whole new set of possibilities, which is only just beginning to be explored). They can be mapped visually on a SIMILE http://simile.mit.edu/timeline/ or similar time-line. They can be translated into other languages more effectively than raw prose; they can be disambiguated (does “5/6/09 mean “5th June 2009? or “6th May 2009?); and they can be presented in the user's preferred format. I suggest that the short list of apps that consume microformatted historical data should not be used to indicate that it's not a worthwhile use case. After all, I know of no user agents that can use time, section, footer, datagrid etc but we mostly expect there to be soon. -- Bruce Lawson Web Evangelist www.opera.com (work) www.brucelawson.co.uk (personal)
Re: [whatwg] Historic dates in HTML5
Bruce Lawson quoted Andy Mabbat: Andy Mabbett has already listed use cases http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-February/018639.html ... They can be mapped visually on a SIMILE http://simile.mit.edu/timeline/ or similar time-line. It's not clear how such a timeline would make use of the time element and I couldn't find any use of microformats on that page. Could you please elaborate on the relevance of that page in regards to this issue? -- Lachlan Hunt - Opera Software http://lachy.id.au/ http://www.opera.com/
Re: [whatwg] Historic dates in HTML5
On Mar 5, 2009, at 01:29, Jim O'Donnell wrote: Is there any suitable markup in HTML5 for dates in digitised documents from museums, libraries and archives? What would consuming software do with those dates? The time element is meant as a replacement for the microformat abbr design pattern in hCalendar (if the microformat community embraces time; if not, time in pretty much pointless in HTML5). The expected use cases of hCalendar are mainly transferring *future* event entries from a Web page into an application like iCal. Conceivable, one might perhaps also want to support entries that encode the birthday (in the past) of a living person with an annual repeat. -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/
Re: [whatwg] Historic dates in HTML5
Thanks Henri, Is time then like address in HTML 4? ie. intended for certain dates only, just as address may not be used to mark up all addresses? In that case, the spec should be clear on correct and incorrect usage, with examples of both to guide authors. Bruce Lawson uses time to mark up the dates of blog posts in the HTML5 version of his wordpress templates. Is this incorrect usage of HTML5? If not, how should HTML5 blog templates work when the blog is dated from 1665 (http://pepysdiary.com) or 1894 (http://www.cosmicdiary1894.blogspot.com/)? Regards Jim Original Message: - From: Henri Sivonen hsivo...@iki.fi Date: Thu, 5 Mar 2009 10:04:45 +0200 To: j...@eatyourgreens.org.uk, whatwg@lists.whatwg.org Subject: Re: [whatwg] Historic dates in HTML5 On Mar 5, 2009, at 01:29, Jim O'Donnell wrote: Is there any suitable markup in HTML5 for dates in digitised documents from museums, libraries and archives? What would consuming software do with those dates? The time element is meant as a replacement for the microformat abbr design pattern in hCalendar (if the microformat community embraces time; if not, time in pretty much pointless in HTML5). The expected use cases of hCalendar are mainly transferring *future* event entries from a Web page into an application like iCal. Conceivable, one might perhaps also want to support entries that encode the birthday (in the past) of a living person with an annual repeat. -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/ mail2web - Check your email from the web at http://link.mail2web.com/mail2web
[whatwg] Historic dates in HTML5
Henri Sivonen said (http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018687.html) The time element is meant as a replacement for the microformat abbr design pattern in hCalendar (if the microformat community embraces time; if not, time in pretty much pointless in HTML5). The expected use cases of hCalendar are mainly transferring *future* event entries from a Web page into an application like iCal. If there's one thing that getting involved in specs of markup languages has taught me, it's that expected use cases don't matter. People always do other things. And if there is a limit on a use case, it should be in the spec. There is nothing I can see in the editors draft that limits the use of time. (I use it on my website to markup publication dates of blog entries and comments; why on earth wouldn't I?) What it does limit is the format: no fuzzy dates like July 1897 for my great grandmother's birthday (no-one remembers the exact day) or the precise date of Charlemagne death 28 January 814 Henri is right: codetime/code is pretty much pointless in HTML5 if it's not embraced by the microformats community, but why would they embrace it? It prevents them doing a lot of what they do - like fuzzy or ancient dates - so what do they gain by adopting it? -- Bruce Lawson Web Evangelist www.opera.com (work) www.brucelawson.co.uk (personal)
Re: [whatwg] Historic dates in HTML5
On Mar 5, 2009, at 13:33, j...@eatyourgreens.org.uk wrote: Is time then like address in HTML 4? ie. intended for certain dates only, just as address may not be used to mark up all addresses? Yes, in the sense that time is designed for contemporary secular civilian use cases. (If someone uses the (Common-Era) proleptic Gregorian calendar calendar for other use cases, (s)he gets a fortuitous free ride.) In that case, the spec should be clear on correct and incorrect usage, with examples of both to guide authors. Indeed: http://www.w3.org/Bugs/Public/show_bug.cgi?id=6536 Bruce Lawson uses time to mark up the dates of blog posts in the HTML5 version of his wordpress templates. Is this incorrect usage of HTML5? It's not incorrect, as currently drafted, but it's most likely not useful. If not, how should HTML5 blog templates work when the blog is dated from 1665 (http://pepysdiary.com) or 1894 (http://www.cosmicdiary1894.blogspot.com/)? If a blogger backdates posts in a way that doesn't fit the (Common- Era) proleptic Gregorian calendar, (s)he shouldn't use time. Note that currently http://www.cosmicdiary1894.blogspot.com/ shows the real posting date in Blogger's date field and the backdated date as text in a heading and neither has any kind of microformat markup. -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/
Re: [whatwg] Historic dates in HTML5
On Mar 5, 2009, at 13:50, Bruce Lawson wrote: And if there is a limit on a use case, it should be in the spec. There is nothing I can see in the editors draft that limits the use of time. I think that's a spec bug. (I use it on my website to markup publication dates of blog entries and comments; why on earth wouldn't I?) You wouldn't if there's no tangible benefit in sight, i.e. no known client app for consuming your markup in a useful way. Henri is right: codetime/code is pretty much pointless in HTML5 if it's not embraced by the microformats community, but why would they embrace it? They might want to adopt it to avoid accessibility problems with the abbr design pattern: http://www.bbc.co.uk/blogs/radiolabs/2008/06/removing_microformats_from_bbc.shtml It prevents them doing a lot of what they do - like fuzzy or ancient dates - so what do they gain by adopting it? Are hCalendar entries with fuzzy or ancient dates good for anything? -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/
Re: [whatwg] Historic dates in HTML5
On Thu, Mar 5, 2009 at 11:33 AM, j...@eatyourgreens.org.uk j...@eatyourgreens.org.uk wrote: [...] Bruce Lawson uses time to mark up the dates of blog posts in the HTML5 version of his wordpress templates. Is this incorrect usage of HTML5? If not, how should HTML5 blog templates work when the blog is dated from 1665 (http://pepysdiary.com) or 1894 (http://www.cosmicdiary1894.blogspot.com/)? This reminds me of the issue I had with the old img alt={description} syntax. People write software that takes some input, and outputs some markup. They want to guarantee that their markup will be valid and correctly interpreted by consumers, regardless of the input. (In the img alt case, the problem was when the input resulted in legitimate alternative (non-description) alt text that started with { and ended with }, forcing the application to add complexity to make sure its output won't be misinterpreted.) In any situation where they use time, they'd probably want to write something like: print time datetime=.$t-toISO8601Date()..$t-toLocalisedHumanReadableDate()./time; But given HTML5's restrictions against BCE years, they'd actually have to write something more like: if ($t-getYear() 0) { # (be careful not to write = 0 here) print time class=time datetime=.$t-toISO8601Date()..$t-toLocalisedHumanReadableDate()./time; } else { print span class=time.$t-toLocalisedHumanReadableDate()./span; } and make sure their stylesheets use the selector .time instead of time, to guarantee everything is going to work correctly even with unexpected input values. So the restriction adds complexity (and bugs) to code that wants to be good and careful and generate valid markup. -- Philip Taylor exc...@gmail.com
Re: [whatwg] Historic dates in HTML5
Philip Taylor wrote: and make sure their stylesheets use the selector .time instead of time, to guarantee everything is going to work correctly even with unexpected input values. So the restriction adds complexity (and bugs) to code that wants to be good and careful and generate valid markup. On the other hand the python datetime class doesn't seem to support years = 0 at all so consuming software written in python would have to re-implement the whole datetime module, potentially causing incompatibilities with third party libraries that expect datetimes to have year = 0. This seems like a great deal more effort than simply checking that dates are in the allowed range before serializing or consuming them in languages that do support years = 0.
Re: [whatwg] Historic dates in HTML5
On Thu, Mar 5, 2009 at 6:16 AM, Philip Taylor excors+wha...@gmail.com wrote: But given HTML5's restrictions against BCE years, they'd actually have to write something more like: if ($t-getYear() 0) { # (be careful not to write = 0 here) print time class=time datetime=.$t-toISO8601Date()..$t-toLocalisedHumanReadableDate()./time; } else { print span class=time.$t-toLocalisedHumanReadableDate()./span; } and make sure their stylesheets use the selector .time instead of time, to guarantee everything is going to work correctly even with unexpected input values. So the restriction adds complexity (and bugs) to code that wants to be good and careful and generate valid markup. They may have to do so if they reasonably expect their dates to cross the 0 demarcation. The intended uses of time will *not* be expected to do so. For example, someone writing a calendar app can safely assume that any and all dates they have to deal with are within the appropriate era. ~TJ
Re: [whatwg] Historic dates in HTML5
On Thu, Mar 5, 2009 at 12:56 PM, James Graham jgra...@opera.com wrote: Philip Taylor wrote: and make sure their stylesheets use the selector .time instead of time, to guarantee everything is going to work correctly even with unexpected input values. So the restriction adds complexity (and bugs) to code that wants to be good and careful and generate valid markup. On the other hand the python datetime class doesn't seem to support years = 0 at all so consuming software written in python would have to re-implement the whole datetime module, potentially causing incompatibilities with third party libraries that expect datetimes to have year = 0. This seems like a great deal more effort than simply checking that dates are in the allowed range before serializing or consuming them in languages that do support years = 0. The Python datetime class doesn't seem to support years either, which HTML5 allows. So Python consumers will already have to do if not year = : discard this time element since I'm not going to be able to do anything with it, and it's easy for them to change that to if not 1 = year = : That seems less effort than adding checks into the producers. If there is a desire that any valid HTML5 date-time string should be representable in Python's datetime class, then HTML5 should limit it to 4 digits and refuse to parse anything longer. If so, why Python's datetime in particular? The C++ Boost.Date_Time (http://www.boost.org/doc/libs/1_38_0/doc/html/date_time/gregorian.html) is apparently limited to 1400-Jan-01 to -Dec-31. Perl DateTime and PHP DateTime and Java joda-time (http://joda-time.sourceforge.net/field.html) seem happy with a range of millions of years in both directions. I'm not sure about any other libraries. The range 1.. seems pretty arbitrary since it only matches Python, and 1..inf doesn't match anything, so neither seems particularly justified by implementations. -- Philip Taylor exc...@gmail.com
Re: [whatwg] Historic dates in HTML5
On Thu, Mar 5, 2009 at 12:56 PM, James Graham jgra...@opera.com wrote: Philip Taylor wrote: and make sure their stylesheets use the selector .time instead of time, to guarantee everything is going to work correctly even with unexpected input values. So the restriction adds complexity (and bugs) to code that wants to be good and careful and generate valid markup. On the other hand the python datetime class doesn't seem to support years = 0 at all so consuming software written in python would have to re-implement the whole datetime module, potentially causing incompatibilities with third party libraries that expect datetimes to have year = 0. This seems like a great deal more effort than simply checking that dates are in the allowed range before serializing or consuming them in languages that do support years = 0. I think limiting the HTML5 spec based on the capabilities of user-agents (or client software) is dangerous. Firstly, software capabilities change over time as features are added/removed. Secondly, capabilities vary between languages and applications. To add to Philip's examples, mysql datetimes are restricted to years = 1000 while MS Sql Server will not accept datetimes prior to 1752. Hence developers parse dates into their components and use integer types, not datetimes, for very old stuff. Should HTML5 cater to the lowest common denominator and refuse datetimes before 1752? Henri is right that the spec should be driven by the needs of authors to markup specific information online and the value of adding particular semantics to the web. If I'm the only publisher who sees a value in marking up historical dates then that's nice, but I'll accept that the HTML spec shouldn't change to accomodate my individual needs. However, Henri is also right that a limited datetime in HTML needs to be absolutely clear in the spec too, which it isn't at the moment. Regards Jim mail2web - Check your email from the web at http://link.mail2web.com/mail2web
Re: [whatwg] Historic dates in HTML5
Tab Atkins Jr. wrote on 3/5/2009 6:55 AM: For example, someone writing a calendar app can safely assume that any and all dates they have to deal with are within the appropriate era. Unless it contains This Day in History type content or a family calendar with significant genealogical dates. But I get that time isn't designed for these types of use cases. - Bil
Re: [whatwg] Historic dates in HTML5
On Wed, Mar 4, 2009 at 5:29 PM, Jim O'Donnell j...@eatyourgreens.org.uk wrote: This then leads to a situation where some dates on the web can be marked up, semantically, as dates but others cannot, which seems somewhat ridiculous really. I imagine most teachers and students marking up a timeline would come to the same conclusion, though if my understanding is correct you can use the time tag for any date, it is the datetime attribute of the time tag that has this particular limitation. Someone correct me if I am wrong. If you Google HTML5 time the first result is a W3Schools page. It gives these two examples: We open at time10:00/time every morning. I have a date on time datetime=2008-02-14Valentines day/time There is no mention that the datetime attribute's year must be between 1 and , and if it did, I think the average person's first thought would be, That's weird. Despite that, here are a couple workarounds that I think are valid: time data-datetime=March 5th, 205 b.c.Something happened/time On timeMarch 5th, 205 b.c./timeSomething happened. In the first example, the data-datetime would be for internal use only. Personally, I think it would be an improvement to the datetime attribute if it was valid for at least - - : p ... For these events to take place within a three week or so period is simply impossible. The time datetime=-0004-03-13eclipse/time cannot be the one written in the records of Josephus./p Potentially relevant: http://en.wikipedia.org/wiki/Year_10,000_problem G.
Re: [whatwg] Historic dates in HTML5
In message 10c0368b-e984-42a7-933f-b7cb6f1f2...@iki.fi, Henri Sivonen hsivo...@iki.fi writes On Mar 5, 2009, at 01:29, Jim O'Donnell wrote: Is there any suitable markup in HTML5 for dates in digitised documents from museums, libraries and archives? What would consuming software do with those dates? I have already described some of the many use-cases for such dates, in: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-February/018639.html et seq. The time element is meant as a replacement for the microformat abbr design pattern in hCalendar Is it? What about the other abuses of ABBR in microformats, such as for coordinates and duration: abbr class=duration title=PT5M48S5:48/abbr ? (if the microformat community embraces time; if not, time in pretty much pointless in HTML5). What about the use-cases which I have described, most of which are not dependent on microformats? The expected use cases of hCalendar are mainly transferring *future* event entries from a Web page into an application like iCal. Are they? Could you provide a citation for that? The hCalendar spec doesn't include a definitive set of use-cases (indeed, hardly any at all - but then it doesn't even include a full set of hCalendar parameters), but it does explicitly refer to writeups of past events. Many of the hCalendar microformats which I've seen published are for historic events, such as those on Wikipedia, for example: Launch of Sputnik 1: http://en.wikipedia.org/wiki/Sputnik_1 Marriage Act, 1753: http://en.wikipedia.org/wiki/Marriage_Act_1753 Are you suggesting that they are in some way in breach of the hCalendar spec? If so, how?? You also seem to overlook that dates are not used not only in hCalendar, but also in other microformats, such as hAtom (for dating feeds) , and hCard (for people's birth dates), for example: Sir Tim Berners-Lee: http://en.wikipedia.org/wiki/Tim_Berners-Lee Anthony of Saxony: http://en.wikipedia.org/wiki/Anthony_of_Saxony The only limit on the use of dates in microformats is that they currently rely on ISO8601, which is restricted to Gregorian dates (chiefly after 1750, but see: http://en.wikipedia.org/wiki/Gregorian_calendar for the complex change-over dates in different countries). This was identified as an issue with the hCalendar specification in September 2006: http://microformats.org/wiki/hcalendar-issues#2006 and is still awaiting a solution, hence my proposal for allowing non-Gregorian dates in time (at the first URL given above). -- Andy Mabbett
Re: [whatwg] Historic dates in HTML5
On 5 Mar 2009, at 15:17, Greg Houston wrote: Personally, I think it would be an improvement to the datetime attribute if it was valid for at least - - : p ... For these events to take place within a three week or so period is simply impossible. The time datetime=-0004-03-13eclipse/time cannot be the one written in the records of Josephus./p I agree that this would be an improvement, since it would make time compatible with hCalendar by using ISO8601 for datetime. By remarkable serendipity, Paul Tarjan posted a presentation about searchmonkey today http://www.slideshare.net/ptarjan/semantic-searchmonkey It mentions searching the web by date, where that information is available. So I would say a key use case for marking up historic dates is searching large archives by date eg. searching the National Maritime Museum archive for Elizabethan Navy records dating from 1595. Wikipedia uses the date-time design pattern, from microformats, to mark up historic dates using ISO8601. In addition, TEI is widely used by archives and libraries to mark up texts, including ISO8601 dates (http://www.tei-c.org/Guidelines/P4/html/ref-DATE.html). Since authors are already publishing dates online, surely HTML5 should accept all ISO8601 dates rather than a limited subset, which requires additional processing on the part of authoring and publishing software to filter out valid dates that are invalid HTML5. Regards Jim Jim O'Donnell j...@eatyourgreens.org.uk http://eatyourgreens.org.uk http://flickr.com/photos/eatyourgreens http://twitter.com/pekingspring
[whatwg] Historic dates in HTML5
Hello, Apologies for coming in late but Bruce Lawson pointed me in the direction of this discussion I had some comments about dates in HTML5. Lachlan Hunt wrote: The time element was primarily designed to address use cases involving contemporary dates. It doesn't address non-Gregorian calendars or BCE dates by design, as it is not really meant for historical dates. Probably the most historical dates that it would really be suitably optimised for are people's birthdates, which, for people alive today, don't really extend back beyond the early 20th century, with very few exceptions. Has any consideration been given to using the time tag in the same manner as the date element from TEI to mark up dates, particularly the calendar attribute to indicate non-Gregorian calendars? (see http://www.tei-c.org/Guidelines/P4/html/ref-DATE.html) I ask because one of the sites I look after is the National Maritime Museum archive search, which includes ~70,000 records dating from the 16th century to present. Of those, around 3,500 predate the Gregorian calendar and have, presumably, Julian dates: http://is.gd/lFrh It would be useful to mark up these dates as dates in the HTML versions of the catalogue records. However, from what Lachlan Hunt has said, it seems the time tag in HTML5 can't be used to do this. This then leads to a situation where some dates on the web can be marked up, semantically, as dates but others cannot, which seems somewhat ridiculous really. Is there any suitable markup in HTML5 for dates in digitised documents from museums, libraries and archives? Regards Jim O'Donnell j...@eatyourgreens.org.uk http://eatyourgreens.org.uk http://flickr.com/photos/eatyourgreens http://twitter.com/pekingspring