[uf-discuss] Store hours with hCal (was: xHours microformat: hours of restaurants, etc.)

Scott Reynen scott at randomchaos.com
Sun Feb 4 14:54:15 PST 2007


I talked to both Tantek and Brian about this in IRC.  Tantek pointed  
out that we shouldn't be naming a solution until after we've  
researched the problem.  In this case, it looks like the solution to  
this problem is hCalendar, so anyone looking for this in the wiki or  
email archive isn't likely to search for something like "xHours."   
For that reason, I've moved the page in the wiki and redirected the  
old page to here:

http://microformats.org/wiki/operating-hours

On Feb 4, 2007, at 2:13 PM, Brian Suda wrote:

> On 2/4/07, Scott Reynen <scott at randomchaos.com> wrote:
>> Looking at Roger's tutorial, maybe this?
>>
>> Original:
>>
>> <b>Hours:</b> Mon-Sat 10:00am-9:00pm<br>Sun 11:00am-7:00pm
>>
>> hCal:
>>
>> <b>Hours:</b>
>> <span class="vevent">
>>         <abbr class="rrule"
>> title="freq=weekly;byday=MO,TU,WE,TH,FR,SA;count=52">Mon-Sat</abbr>
>
> --- the issue here is that WEEKLY is now hidden metadata. This needs
> to be pulled out into a human-readable form.

I've collected a few real-world examples here:

http://microformats.org/wiki/operating-hours-examples

I'm sure it would help to collect more, but from what I've seen so  
far, we can't expect publishers to explicitly state that operating  
hours are weekly.  It's widely assumed that operating hours repeat  
weekly.  I think Brian's right that we should avoid stuffing the  
entire RRULE in a single <abbr> as I did above, but I doubt we can  
generally avoid putting "weekly" in an <abbr> title.

>>         <abbr class="dtstart" title="20070101T 100000Z">10:00am</ 
>> abbr>-
>>         <abbr class="dtend" title="20070101T 210000Z">9:00pm</abbr>
>> </span><br>
>
>> But I'm not sure if that will work.  Do times in dtstart and dtend
>> get repeated, or are only times specified in byhour and byminute
>> repeated?  If the former, what happens when both are listed and they
>> conflict?  If the latter, is there any way to specify end time?
>
> --- DTEND or DURATION are used to terminate the RRULE, so this
> reoccuring event will only last one day.

I discussed this with Brian more and found this in the iCal spec:

> The "DTSTART" and "DTEND" property pair or "DTSTART" and "DURATION"
> property pair, specified within the iCalendar object defines the
> first instance of the recurrence.

Brian also exported a .ics file from iCal, which seems to confirm the  
following:

Start first instance: DTSTART
End first instance: DTEND (or DURATION)
Start repetition: RRULE BYDAY (or BYHOUR, etc.)
End repetition: RRULE UNTIL (or RRULE COUNT)

So it looks like I wasn't too far off with my first stab at doing  
operating hours with RRULE, but we should still check this against  
some real-world examples.

Peace,
Scott


More information about the microformats-discuss mailing list