[uf-dev] Human and machine readable data format

Glenn Jones glenn.jones at madgex.com
Mon Jun 30 21:59:13 PDT 2008


Guillaume Lebleu wrote

>    * What is the purpose of "Date:". Couldn't this be moved to the
>      class attribute? or in the hCalendar context be inferred from
>      class="dstart"?

I added a prefix which describes the data type, in this case "Date:" to
help the parser developers test the format by using a string sartsWith
functions. Whatever solution we come up with ISO dates will most likely
be kept for backwards compatibility. It may be possible to drop the
prefix. The ISO duration is a hard format to test for without a prefix.

>    * What do you think of my earlier suggestion to base the human and
>      machine-readable on official writing practices in each locale
(ex.
>      in en-us: "January 25, 2008")

The language descriptions that I suggested is flexible enough to allow
for language and culture/locale differences.

I.e. we could use a British format "25 January 2008"
{
"language-name" : "English", 
"language-codes" : ["en-gb"], 
""pattern": "date,month,year,time,timezone",  
"scrub-terms": ["Date:", "at", "," "Time zone"],
"month-names": ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"]
}

I.e. we could use a US format "January 25, 2008"
{
"language-name" : "English", 
"language-codes" : ["en-us"], 
""pattern": "month,date,year,time,timezone",  
"scrub-terms": ["Date:", "at", "," "Time zone"],
"month-names": ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"]
}

The pattern property allows for a reordering of the elements. Working
out the fall back to just language code "en" would be fun.  

>    * What do you think of the idea of making title optional if the
>      date/time is already written in official writing practices in
each
>      locale.

That rule already exists as part of how the parsers work today.

<span class="dtstart">2008-01-25</span>

The above is valid, this would natural be extended to any new format.

Glenn 




More information about the microformats-dev mailing list