[uf-discuss] Microformat idea: store hours
Karl Dubost
karl at w3.org
Fri Nov 11 18:59:46 PST 2005
Le 2005-11-11 à 21:09, Tantek Çelik a écrit :
> I refer you to RFC2445 and the intricate details of RRULES which
> allow for
> patterns of exceptions.
> http://microformats.org/wiki/store-hours-examples
[[[
>This is Sam's bakery's opening times for the year 2000 and onward.
>
>Sam's bakery is open from 7 to 12 and 13 to 18, Monday through
Thursday.
>(They close for lunch between 12 and 13)
>Sam's is open from 7 to 12 and 13 to 15.30 on Fridays
>Sam's is open from 9 to 13 on Saturdays
>Sam's is closed on Sundays
>Sam's does not open on Saturdays during the period of July 5 to
August 5
>Sam shuts down on the following holidays; Jan 1, Feb, 12 July 9,
Oct 8,
Dec
>24, 25
FYI. I think you mean EXDATE, not EDATE in your original note. The
easiest way to represent these store hours is to define separate
VEVENTs and relate them using the RELATED-TO property. How about this
using four events, one for the weekday morning store hours, a second
for the weekday MO-TH afternoon store hours, a third for the weekday
FR afternoon store hours and a fourth for the weekend store hours.
Interesting, this is very much the same way that the store hours
would be listed on the front door or on a website for the store!
Actually, it is VERY important to keep the store hours as separate
VEVENTS, as there will most probably be different store help for
each. Your know the quirks of these unions ;-) In addition, if you
copy the events on to the employee's work calendars you will want
them as separate events. Bill won't want to see he is working the
weekend when he has a hot date with Sally! There are probably other
good reasons to have these as separate but linked/related events too.
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:19990101T100000Z
UID:123
DTSTART;TZID=US/Eastern:19990104T070000
DTEND;TZID=US/Eastern:19990104T120000
SUMMARY:Sam's Bakery Weekday Morning Hours
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
EXDATE:19990101,19990212,19990709,19991008,19991224,19991225
RELATED-TO;RELTYPE=SIBLING:124
RELATED-TO;RELTYPE=SIBLING:125
RELATED-TO;RELTYPE=SIBLING:126
END:VEVENT
BEGIN:VEVENT
DTSTAMP:19990101T100001Z
UID:124
DTSTART;TZID=US/Eastern:19990104T130000
DTEND;TZID=US/Eastern:19990104T180000
SUMMARY:Sam's Bakery MO-TH Afternoon Hours
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH
EXDATE:19990101,19990212,19990709,19991008,19991224,19991225
RELATED-TO;RELTYPE=SIBLING:123
RELATED-TO;RELTYPE=SIBLING:125
RELATED-TO;RELTYPE=SIBLING:126
END:VEVENT
BEGIN:VEVENT
DTSTAMP:19990101T100001Z
UID:125
DTSTART;TZID=US/Eastern:19990101T130000
DTEND;TZID=US/Eastern:19990101T183000
SUMMARY:Sam's Bakery FR Afternoon Hours
RRULE:FREQ=WEEKLY;BYDAY=FR
EXDATE:19990101,19990212,19990709,19991008,19991224,19991225
RELATED-TO;RELTYPE=SIBLING:123
RELATED-TO;RELTYPE=SIBLING:125
RELATED-TO;RELTYPE=SIBLING:126
END:VEVENT
BEGIN:VEVENT
DTSTAMP:19990101T100001Z
UID:126
DTSTART;TZID=US/Eastern:19990102T090000
DTEND;TZID=US/Eastern:19990102T130000
SUMMARY:Sam's Bakery Weekend Hours
DESCRIPTION:NOTE: We are closed SUNDAYS.\n We will also
be closed on Saturdays, from July 5 through August 5.\n
We hope you enjoy your summer holidays also! -- Sam's
RRULE:FREQ=WEEKLY;BYDAY=SA
EXDATE:19990101,19990212,19990709,19991008,19991224,19991225
EXDATE:19990710,19990717,19990724,19990731
RELATED-TO;RELTYPE=SIBLING:123
RELATED-TO;RELTYPE=SIBLING:124
RELATED-TO;RELTYPE=SIBLING:125
END:VEVENT
END:VCALENDAR
One thing this exercise does point out is that it would have been very
useful to have a ";START=" RECUR value, rule component. This would have
been useful in the EXRULE definition for the Saturday close dates. For
example, with this enhancement:
EXRULE:FREQ=WEEKLY;BYDAY=SA;START=19990710;UNTIL=19990805
]]]
-- [Ietf-calsify] Re: EXRULE and multiple RRULEs - Frank Dawson store
examples
http://lists.osafoundation.org/pipermail/ietf-calsify/2005-February/
000413.html
Mon, 21 Feb 2005 05:57:12 GMT
Also a search in Google for
* [vevent filetype:ics] returns 27200 files
http://www.google.com/search?q=vevent%20filetype%3Aics
* [rrules filetype:ics] returns 48 files
http://www.google.com/search?q=rrules+filetype%3Aics
* ["related-to" filetype:ics] returns 109 files
http://www.google.com/search?q=%22related-to%22+filetype%3Aics
--
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager
*** Be Strict To Be Cool ***
More information about the microformats-discuss
mailing list