Re: [whatwg] Historic dates in HTML5

2009-03-10 Thread Andy Mabbett
In message <49b58c3d.5000...@lachy.id.au>, Lachlan Hunt
 writes

>Bruce Lawson quoted Andy Mabbat:

Mabbett; as below.

>> 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"
>>
>>   
>>
>> 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?

Neither of us claimed that that site is using microformats (though there
is no reason why it could not do so).

It was given as evidence that people are publishing historic,
non-Gregorian , BCE and low-granularity dates "in the wild"; and as a
use case for parsing sets of such dates found on other pages.

Furthermore, such timelines can be created from pages which publish
microformats (and which could thus use ).

An example of a tool to generate a SIMILE timeline from a page with
hCalendar microformats is:



and a simple timeline generated using that tool, by parsing the
microformats on:



is:




(aka  )


-- 
Andy Mabbett


Re: [whatwg] Historic dates in HTML5

2009-03-09 Thread Lachlan Hunt

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"

  

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/


[whatwg] Historic dates in HTML5

2009-03-09 Thread Bruce Lawson
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: 1066 :  
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):

  

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"

  

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

2009-03-05 Thread Jim O'Donnell

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 - - :

 ... For these events to take place within a three week or so
period is simply impossible. The eclipse cannot be the one written in the
records of Josephus.


I agree that this would be an improvement, since it would make   
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



Re: [whatwg] Historic dates in HTML5

2009-03-05 Thread Andy Mabbett
In message <10c0368b-e984-42a7-933f-b7cb6f1f2...@iki.fi>, Henri Sivonen 
 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:

  


et seq.


The  element is meant as a replacement for the microformat
 design pattern in hCalendar


Is it? What about the other abuses of ABBR in microformats, such as for 
coordinates and duration:


5:48 ?


(if the microformat community  embraces ; if not,  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:


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:


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:




for the complex change-over dates in different countries). This was 
identified as an issue with the hCalendar specification in September 
2006:




and is still awaiting a solution, hence my proposal for allowing 
non-Gregorian dates in  (at the first URL given above).


--
Andy Mabbett


Re: [whatwg] Historic dates in HTML5

2009-03-05 Thread Greg Houston
On Wed, Mar 4, 2009 at 5:29 PM, Jim O'Donnell  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 10:00 every morning.

I have a date on Valentines day

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:

Something happened

On March 5th, 205 b.c.Something 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 - - :

 ... For these events to take place within a three week or so
period is simply impossible. The eclipse cannot be the one written in the
records of Josephus.


Potentially relevant:
http://en.wikipedia.org/wiki/Year_10,000_problem

G.


Re: [whatwg] Historic dates in HTML5

2009-03-05 Thread Bil Corry
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  isn't designed for these 
types of use cases.


- Bil



Re: [whatwg] Historic dates in HTML5

2009-03-05 Thread j...@eatyourgreens.org.uk


On Thu, Mar 5, 2009 at 12:56 PM, James Graham  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

2009-03-05 Thread Philip Taylor
On Thu, Mar 5, 2009 at 12:56 PM, James Graham  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

2009-03-05 Thread Tab Atkins Jr.
On Thu, Mar 5, 2009 at 6:16 AM, Philip Taylor  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 " datetime=".$t->toISO8601Date().">".$t->toLocalisedHumanReadableDate()."";
>  } else {
>    print "".$t->toLocalisedHumanReadableDate()."";
>  }
>
> 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  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

2009-03-05 Thread James Graham

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

2009-03-05 Thread Philip Taylor
On Thu, Mar 5, 2009 at 11:33 AM, j...@eatyourgreens.org.uk
 wrote:
> [...]
> Bruce Lawson uses  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  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 
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 , they'd probably want to write
something like:

  print "".$t->toLocalisedHumanReadableDate()."";

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 "".$t->toLocalisedHumanReadableDate()."";
  } else {
print "".$t->toLocalisedHumanReadableDate()."";
  }

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

2009-03-05 Thread Henri Sivonen

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 .


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: time 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  
 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

2009-03-05 Thread Henri Sivonen

On Mar 5, 2009, at 13:33, j...@eatyourgreens.org.uk wrote:

Is  then like  in HTML 4? ie. intended for certain  
dates only, just as  may not be used to mark up all  
addresses?


Yes, in the sense that  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  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 . 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/




[whatwg] Historic dates in HTML5

2009-03-05 Thread Bruce Lawson
Henri Sivonen said  
(http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018687.html)


"The  element is meant as a replacement for the microformat
 design pattern in hCalendar (if the microformat community
embraces ; if not,  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 . (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: time 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

2009-03-05 Thread j...@eatyourgreens.org.uk
Thanks Henri,

Is  then like  in HTML 4? ie. intended for certain dates
only, just as  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  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  element is meant as a replacement for the microformat  
 design pattern in hCalendar (if the microformat community  
embraces ; if not,  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




Re: [whatwg] Historic dates in HTML5

2009-03-05 Thread Henri Sivonen

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  element is meant as a replacement for the microformat  
 design pattern in hCalendar (if the microformat community  
embraces ; if not,  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/




[whatwg] Historic dates in HTML5

2009-03-04 Thread Jim O'Donnell

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  tag in the same  
manner as the  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  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