opening-hours-brainstorming: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎calendar of unnamed events: add example of using h-event for open hours)
m (→‎Jacky's Idea for Rendering a Week of Hours: Adds indentation to make thread easier to follow.)
 
(9 intermediate revisions by 3 users not shown)
Line 11: Line 11:
As suggested by jacky in [[irc]], a calendar of unnamed events (using [[h-event]]), perhaps nested in the venue's [[h-card]], maybe sufficient to imply/convey opening hours for those days.
As suggested by jacky in [[irc]], a calendar of unnamed events (using [[h-event]]), perhaps nested in the venue's [[h-card]], maybe sufficient to imply/convey opening hours for those days.


I think opening hours is worth its own type. `h-x-opening-hours` or some such thing. With a single property that is a nested h-event. [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 02:38, 20 February 2021 (UTC)
* I think opening hours is worth its own type. `h-x-opening-hours` or some such thing. With a single property that is a nested h-event. [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 02:38, 20 February 2021 (UTC)
 
** My only hesistation against making a new type is that the 'specifics' are things that can be defined by a machine (when to start, when to end) and everything else is human-specific (and thus a rendering layer). [[User:Jacky|Jacky]] 18:41, 20 Feb 2021 PST
My only hesistation against making a new type is that the 'specifics' are things that can be defined by a machine (when to start, when to end) and everything else is human-specific (and thus a rendering layer). [[User:Jacky|Jacky]] 18:41, 20 Feb 2021 PST
** A new microformat (h-*) feels like it's taking on too big of a problem when we can probably find smaller problems to solve first (per [[process|The microformats process]]). A problem I think I saw come up in chat is how to represent the time for a day of the week. Maybe we could work on how to represent a "day-of-week relative" time with existing properties in an h-event. [[User:GRegorLove|gRegor]] ([[User talk:GRegorLove|talk]]) 20:58, 23 February 2021 (UTC)
*** What is the use case for "'day-of-week relative' time"? I assume this is something different to a specific date, so not Saturday 2021-02-27T13:00. The problem is html5's datetime attribute doesn't have a way to specify day of week. Such things are in various iso specs, but those conventions would have to be ported to html5. That's obviously outside the scope of microformats. If you have details about what came up in chat, I'd be curious to see the problem. [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 21:03, 27 February 2021 (UTC)


==== [[User:Jacky|Jacky]]'s Idea for Rendering a Week of Hours ====
==== [[User:Jacky|Jacky]]'s Idea for Rendering a Week of Hours ====
Line 27: Line 28:
<pre>
<pre>
   <aside class="h-feed">
   <aside class="h-feed">
     <h2 class="p-name>Hours</h2>
     <h2 class="p-name">Hours</h2>
     <p class="h-event" id="Monday">Closed on <a href="#Monday" class="u-url p-name">Mondays</a>.</p>
     <p class="h-event" id="Monday">Closed on <a href="#Monday" class="u-url p-name">Mondays</a>.</p>
     <p class="h-event" id="Tuesday"><a href="#Tuesday" class="u-url p-name">Tuesday</a> from <time class="dt-start" datetime="9:00AM">9 AM</time> to <time class="dt-end" datetime="6:00PM">6 PM</time>.</p>
     <p class="h-event" id="Tuesday">Open on <a href="#Tuesday" class="u-url p-name">Tuesdays</a> from <time class="dt-start" datetime="09:00:00">9 AM</time> to <time class="dt-end" datetime="18:00:00">6 PM</time>.</p>
   </aside>
   </aside>
</pre>
</pre>
Some thoughts:
* Using `h-feed` for a feed of events raises some issues: [[h-feed]] is explicitly described as "a stream or feed of h-entry posts". I suppose that could be changed, but it requires changing a fairly stable spec. And it means that authors who are new to microformats will have to learn how to distinguish them. I think a new type should be used to avoid confusion. Note that [[hCalendar]] was created as a 1:1 html version of iCalendar, a ''collection'' of events; microformats2's [[h-event]] is for a ''single'' event. If we go with a feed of events, we should revive the iCalendar idea. We need to give it a name that makes it clear it's a feed of events. Perhaps '''h-feed-events'''? [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 18:15, 21 February 2021 (UTC)
** There are two GitHub issues (https://github.com/microformats/h-feed/issues/3 and https://github.com/microformats/h-entry/issues/16) arguing against me and for broadening [[h-feed]]'s use. So that might be the way to go. I still think we need a way to determine that the feed specifies opening hours, perhaps with a p-children-type for h-feed. [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 20:11, 21 February 2021 (UTC)
* I don't understand how the <code>id</code> attributes and url fragment urls are supposed to work. The fragment urls link to their own p containers. Is that supposed to convey that this is a repeating event? [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 18:27, 21 February 2021 (UTC)


=== simple class proposal ===
=== simple class proposal ===
Line 57: Line 65:
I don't see anything in [https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601] to specify days of the week. [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 17:02, 16 December 2020 (UTC)
I don't see anything in [https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601] to specify days of the week. [[User:Btrem|Btrem]] ([[User talk:Btrem|talk]]) 17:02, 16 December 2020 (UTC)
</div>
</div>
=== Operating Hours Brainstorming ===
:This section was merged from [[operating-hours]]
This section documents a method that can be used to mark up the operating hours of stores, restaurants, museums, offices, and other establishments that have set hours and are open on a regular basis. This is based on the [[hCalendar]] microformat.
==== Discussion Participants ====
===== Authors =====
* [http://dragotown.com Nick Drago]
* [http://suda.co.uk/ Brian Suda]
===== Contributors =====
==== Introduction ====
This effort came about as a result of the need for a human and machine readable markup format that can be used to define the operating hours of establishments.
Stores, businesses, etc. often provide their operating hours on their websites. With the addition of a small bit of markup, they are able to define their operating hours on their websites in such a way that spiders and other aggregators can retrieve such hours, automatically convert them to the iCalendar format, and use this data in any iCalendar application or service.
==== Using RRULE in hCalendar ====
This was suggested [http://microformats.org/discuss/mail/microformats-discuss/2007-February/008562.html] by Brian. Is this the most appropriate method? --Nick
<pre>
// example definition of operating hours using RRULE in hCalendar
<h1>Pardon the Interruption</h1>
<p class="vevent">
  <a class="url uid summary"
href="http://sports.espn.go.com/...">Pardon the Interruption</a>
  is a <span class="category">TV</span> <span
class="category">sports</span> show.
  <abbr class="dtstart" title="2001-10-22">It airs</abbr>
  <span class="rrule">
        <span class="freq">weekly</span>
    <abbr class="byday" title="mo,tu,we,th,fr">Monday to
Friday</abbr> at <abbr class="byhour" title="5">5:30pm</abbr>
  </span>
  <!-- timezones should be avoided -->
  <abbr class="tzid" title="US-Eastern">ET</abbr> on ESPN.
  The hosts of the show are longtime friends
  <span class="hcard">
      <span class="fn n">
          <span class="given-name">Tony</span>
          <span class="family-name">Kornheiser</span>
      </span>
  </span>
  and ... (hCard for Michael Wilbon not shown)
  <span class="description">They discuss - and frequently argue over
- the top stories of the
  day in "sports... and other stuff".</span>
</p>
</pre>
==== References ====
===== Normative References =====
* [http://www.w3.org/TR/2002/REC-xhtml1-20020801/ XHTML 1.0 SE]
* [[hcard]]
* [[hCalendar]]
* [http://www.ietf.org/rfc/rfc2445.txt iCalendar RFC2445]
* [http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html ISO 8601]
===== Informative References =====
* [http://en.wikipedia.org/wiki/ISO_8601 Wikipedia article on ISO 8601]
* [http://www.xfront.com/microformats/hCalendar_part2.html Tutorial on recurring events in hCalendar]
===== Related =====
* [[operating-hours-examples]]
* [http://microformats.org/discuss/mail/microformats-discuss/2007-February/008562.html Corresponding thread from uf-discuss]


== related ==
== related ==

Latest revision as of 21:14, 27 February 2021

This is part of an effort per the microformats process to research, gather examples, and brainstorm for a microformat for marking up the opening hours for a business or organization.

brainstorming

Brainstorming proposals should only be written up after examples and formats research has been completed per the process.

calendar of unnamed events

As suggested by jacky in irc, a calendar of unnamed events (using h-event), perhaps nested in the venue's h-card, maybe sufficient to imply/convey opening hours for those days.

  • I think opening hours is worth its own type. `h-x-opening-hours` or some such thing. With a single property that is a nested h-event. Btrem (talk) 02:38, 20 February 2021 (UTC)
    • My only hesistation against making a new type is that the 'specifics' are things that can be defined by a machine (when to start, when to end) and everything else is human-specific (and thus a rendering layer). Jacky 18:41, 20 Feb 2021 PST
    • A new microformat (h-*) feels like it's taking on too big of a problem when we can probably find smaller problems to solve first (per The microformats process). A problem I think I saw come up in chat is how to represent the time for a day of the week. Maybe we could work on how to represent a "day-of-week relative" time with existing properties in an h-event. gRegor (talk) 20:58, 23 February 2021 (UTC)
      • What is the use case for "'day-of-week relative' time"? I assume this is something different to a specific date, so not Saturday 2021-02-27T13:00. The problem is html5's datetime attribute doesn't have a way to specify day of week. Such things are in various iso specs, but those conventions would have to be ported to html5. That's obviously outside the scope of microformats. If you have details about what came up in chat, I'd be curious to see the problem. Btrem (talk) 21:03, 27 February 2021 (UTC)

Jacky's Idea for Rendering a Week of Hours

Main Page:

 <aside class="h-card">
   We're open <a class="h-event u-url" href="/open-days" rel="calendar" title="Open Hours">Tuesdays to Fridays from 10 AM to 9 PM</a>, closed Sundays, Saturdays and Mondays.
 </aside>

Event Page:

  <aside class="h-feed">
     <h2 class="p-name">Hours</h2>
     <p class="h-event" id="Monday">Closed on <a href="#Monday" class="u-url p-name">Mondays</a>.</p>
     <p class="h-event" id="Tuesday">Open on <a href="#Tuesday" class="u-url p-name">Tuesdays</a> from <time class="dt-start" datetime="09:00:00">9 AM</time> to <time class="dt-end" datetime="18:00:00">6 PM</time>.</p>
  </aside>

Some thoughts:

  • Using `h-feed` for a feed of events raises some issues: h-feed is explicitly described as "a stream or feed of h-entry posts". I suppose that could be changed, but it requires changing a fairly stable spec. And it means that authors who are new to microformats will have to learn how to distinguish them. I think a new type should be used to avoid confusion. Note that hCalendar was created as a 1:1 html version of iCalendar, a collection of events; microformats2's h-event is for a single event. If we go with a feed of events, we should revive the iCalendar idea. We need to give it a name that makes it clear it's a feed of events. Perhaps h-feed-events? Btrem (talk) 18:15, 21 February 2021 (UTC)
  • I don't understand how the id attributes and url fragment urls are supposed to work. The fragment urls link to their own p containers. Is that supposed to convey that this is a repeating event? Btrem (talk) 18:27, 21 February 2021 (UTC)

simple class proposal

proposed format:

<span class="operating-hours"> Tu-Sa 08:00-15:00; Sa 08:00-12:00 </span>

see it here: http://www.geodatacheck.com/p/2

Use a semicolon to separate the different days or or time ranges. Use two letter english day names. Times are local times with leading zero

This is the format as used in openstreetmap.org for a node description with opening hours. Openstreetmap has very rigid semantics, so it makes sense to follow their format. There are several issues with proposal:

  • citation needed - please provide a link to where Openstreetmap defines this format on the opening-hours-formats page. - Tantek 18:08, 21 December 2012 (UTC)
  • no real world use case. how would such a microformat help users? this should be documented in the introduction to an opening-hours effort. - Tantek 21:17, 21 February 2011 (UTC)
  • proposal is 'a priori' - that is proposal has been made without documentation of real world examples per the process. please document real world examples of pages that would benefit from this markup so we can design the format only for their needs and no more. - Tantek 21:17, 21 February 2011 (UTC)
  • did not research previous formats. we have no idea if this effort is reinventing various wheels or not. - Tantek 21:17, 21 February 2011 (UTC)
  • uses new datetime formats, e.g. "Tu-Sa". Is there some way to re-use ISO8601 instead? - Tantek 21:17, 21 February 2011 (UTC)
  • not international, e.g. "Tu-Sa". this could be addressed with ISO8601 usage instead. - Tantek 21:17, 21 February 2011 (UTC)

I don't see anything in ISO 8601 to specify days of the week. Btrem (talk) 17:02, 16 December 2020 (UTC)

Operating Hours Brainstorming

This section was merged from operating-hours

This section documents a method that can be used to mark up the operating hours of stores, restaurants, museums, offices, and other establishments that have set hours and are open on a regular basis. This is based on the hCalendar microformat.

Discussion Participants

Authors
Contributors

Introduction

This effort came about as a result of the need for a human and machine readable markup format that can be used to define the operating hours of establishments.

Stores, businesses, etc. often provide their operating hours on their websites. With the addition of a small bit of markup, they are able to define their operating hours on their websites in such a way that spiders and other aggregators can retrieve such hours, automatically convert them to the iCalendar format, and use this data in any iCalendar application or service.

Using RRULE in hCalendar

This was suggested [1] by Brian. Is this the most appropriate method? --Nick

// example definition of operating hours using RRULE in hCalendar

<h1>Pardon the Interruption</h1>
<p class="vevent">
  <a class="url uid summary"
href="http://sports.espn.go.com/...">Pardon the Interruption</a>
  is a <span class="category">TV</span> <span
class="category">sports</span> show.
  <abbr class="dtstart" title="2001-10-22">It airs</abbr>
  <span class="rrule">
        <span class="freq">weekly</span>
    <abbr class="byday" title="mo,tu,we,th,fr">Monday to
Friday</abbr> at <abbr class="byhour" title="5">5:30pm</abbr>
  </span>

  <!-- timezones should be avoided -->
  <abbr class="tzid" title="US-Eastern">ET</abbr> on ESPN.

  The hosts of the show are longtime friends
  <span class="hcard">
      <span class="fn n">
          <span class="given-name">Tony</span>
          <span class="family-name">Kornheiser</span>
      </span>
  </span>
  and ... (hCard for Michael Wilbon not shown)
  <span class="description">They discuss - and frequently argue over
- the top stories of the
  day in "sports... and other stuff".</span>
</p>

References

Normative References
Informative References
Related

related

see also