Warning: This tool or project is no longer maintained and kept available only for archival purposes. Since GoodRelations and schema.org have evolved significantly in the past years, the current status available on this page is unlikely to function as expected. We take no responsibility for any damage caused by the use of this outdated work, to the extent legally possible.

Due to a lack of resources, we are unable to provide support for this project outside of consulting projects or sponsored research. Please contact us if you can contribute resources to update and enhance these resources.

GoodRelations - The Web Vocabulary for E-Commerce

This is the archive of the goodrelations dicussion list

GoodRelations is a standardized vocabulary for product, price, and company data that can (1) be embedded into existing static and dynamic Web pages and that (2) can be processed by other computers. This increases the visibility of your products and services in the latest generation of search engines, recommender systems, and other novel applications.

[goodrelations] shop opening times - different times for different days in the week, and non-standard times for specific dates?

Ben Dougall ben at hdbatik.co.uk
Mon Oct 11 13:45:13 CEST 2010


HI Martin,

Thanks very much for that. I haven't absorbed all of it yet but all  
looks great so far, will go through it in detail soon.

Thanks, Ben.

On 10 Oct, 2010, at 5:10 pm, Martin Hepp wrote:

> Hi Ben,
>
> Apologies for the delay, the GoodRelations service update got in my  
> way ;-)
> In a nutshell, all what you seem to need is already built into  
> GoodRelations since day one ;-) See inline comments:
>
> On 09.10.2010, at 12:27, Ben Dougall wrote:
>
>> Hello, (resending this, as no answer and in case it didn't get  
>> through, also it's modified somewhat)
>>
>> I can see the standard examples of opening times which show how to  
>> state Mon-Fri opening times, then Sat opening times here:
>> http://www.ebusiness-unibw.org/wiki/ 
>> GoodRelationsQuickstart#Shop.2C_Restaurant.2C_or_Store.2C_and_Opening_ 
>> Hours
>>
>> Three things further to that example, relating to opening times:
>>
>> 1.
>> How should it be done if you have varying times for weekdays? Say  
>> you've got these opening times:
>>
>> Monday: 8am - 5.30pm
>> Tuesday: 8am - 5.30pm
>> Wednesday: 8am - 1pm
>> Thursday: 8am - 5.30pm
>> Friday: 8am - 6.30pm
>> Saturday: 8am - 1pm
>> Sunday: Closed
>>
>> So Mon, Tue, Thu are the same as each other.
>> Wed and Sat are the same as each other.
>> Then there's Fri.
>>
>> Do you group them in the RDF data -- the order doesn't matter? So for  
>> Mon, Tue, Thu it'd be this maybe?:
>>
>>    <div rel="gr:hasOpeningHoursSpecification">
>>      <div about="#???????" typeof="gr:OpeningHoursSpecification">
>>        <div property="gr:opens" content="08:00:00"  
>> datatype="xsd:time"></div>
>>        <div property="gr:closes" content="17:30:00"  
>> datatype="xsd:time"></div>
>>        <div rel="gr:hasOpeningHoursDayOfWeek"  
>> resource="http://purl.org/goodrelations/v1#Thursday"></div>
>>        <div rel="gr:hasOpeningHoursDayOfWeek"  
>> resource="http://purl.org/goodrelations/v1#Tuesday"></div>
>>        <div rel="gr:hasOpeningHoursDayOfWeek"  
>> resource="http://purl.org/goodrelations/v1#Monday"></div>
>>      </div>
>>    </div>
>>
>> What goes where the ???'s are? Maybe #mon_tue_thu ? But it seems  
>> #mon_fri means Mon to Fri so #mon_tue_thu probably wouldn't work. In  
>> that case can you not group the days of the same times regardless of  
>> their order in the week, like I have above? Also is the order of the  
>> <div rel="gr:hasOpeningHoursDayOfWeek"... lines meaningful? I guess  
>> not seeing as they're in reverse in the example code.
>
> 1. The order of the blocks does not matter, just the order of elements  
> (tags) inside the blocks.
> The order of the <div rel="gr:hasOpeningHoursDayOfWeek"... lines does  
> not matter, as long as they are on the same level.
>
> 2. You can use any text you want for the about="#???" part, as long as  
> you don't use it for any other purpose. It's just an identifier and  
> does not carry any real meaning. You could even omit the about=""  
> attribute completely, creating RDF blank nodes. That may negative  
> affect the visibility / accessibility of your data, but would be  
> formally correct.
>
> 3. Here is the proper code for your example:
>
> <!-- in RDFa 1.1, you can use the abbreviation: <div  
> profile="http://www.heppnetz.de/grprofile/"> -->
> <div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
>      xmlns="http://www.w3.org/1999/xhtml"  
> xmlns:foaf="http://xmlns.com/foaf/0.1/"  
> xmlns:gr="http://purl.org/goodrelations/v1#"
>      xmlns:vcard="http://www.w3.org/2006/vcard/ns#"  
> xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
>
>   <div about="#store" typeof="gr:LocationOfSalesOrServiceProvisioning">
>     <div property="rdfs:label" content="Pizzeria La Mamma"></div>
>     <div rel="vcard:adr">
>   ... vcard part omitted in here
>       </div>
>     </div>
>     <div rel="gr:hasOpeningHoursSpecification">
>       <div about="#mon_tue_thu" typeof="gr:OpeningHoursSpecification">
>         <div property="gr:opens" content="08:00:00"  
> datatype="xsd:time"></div>
>         <div property="gr:closes" content="17:30:00"  
> datatype="xsd:time"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/godrelations/v1#Thursday"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Tuesday"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Monday"></div>
>       </div>
>     </div>
>     <div rel="gr:hasOpeningHoursSpecification">
>       <div about="#wed_sat" typeof="gr:OpeningHoursSpecification">
>         <div property="gr:opens" content="08:00:00"  
> datatype="xsd:time"></div>
>         <div property="gr:closes" content="13:00:00"  
> datatype="xsd:time"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Wednesday"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Saturday"></div>
>       </div>
>     </div>
>     <div rel="gr:hasOpeningHoursSpecification">
>       <div about="#fri" typeof="gr:OpeningHoursSpecification">
>         <div property="gr:opens" content="08:00:00"  
> datatype="xsd:time"></div>
>         <div property="gr:closes" content="18:30:00"  
> datatype="xsd:time"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Friday"></div>
>       </div>
>     </div>
>     <div rel="foaf:page" resource=""></div>
>   </div>
> </div>
>
>
>>
>> I need to write some PHP code which outputs the correct RDF data  
>> based on what the opening times are currently set to, so I need to  
>> know the general rules for how the days should be grouped/marked up  
>> depending on whether they have the same or different opening times as  
>> other days.
>
> You may want to look at the GoodRelations Snippet Generator and the  
> GoodRelations Annotator Tools and play with their output:
>
>
> http://www.ebusiness-unibw.org/tools/grsnippetgen/
>
> http://www.ebusiness-unibw.org/tools/goodrelations-annotator/
>
> The Annotator tool is more flexible (but also more complex to use).  
> But it will show you how to encode any opening hours pattern.
>
>>
>> 2.
>> How should opening times which differ to the standard/default times  
>> for a specific date be specified? For example, for a bank holiday,  
>> which are usually on Mondays, so that would be closed on a specific  
>> Monday. How would that be specified? Presumably specific date  
>> specifications over-ride the standard/default Mon-Sun times?
>
> In general, public holidays in the region of the store will superseed  
> any pattern. So if a store says its open Mondays from 8:00 - 18:00,  
> don't expect it to be open of that Monday is bank holiday.
>
> If you want to specify opening hours for all public holidays, you can  
> use http://purl.org/goodrelations/v1#PublicHolidays as a "dummy" day  
> of the week.
>
> If you want to be more specific, simply attach gr:validFrom and  
> gr:validThrough to your opening hours node:
>
>   <div about="#store" typeof="gr:LocationOfSalesOrServiceProvisioning">
>     <div property="rdfs:label" content="Pizzeria La Mamma"></div>
>     <div rel="vcard:adr">
>   ... vcard part omitted in here
>       </div>
>     </div>
>     <div rel="gr:hasOpeningHoursSpecification">
>       <div about="#mon_tue_thu" typeof="gr:OpeningHoursSpecification">
>         <div property="gr:opens" content="08:00:00"  
> datatype="xsd:time"></div>
>         <div property="gr:closes" content="17:30:00"  
> datatype="xsd:time"></div>
>         <div property="gr:validFrom" content="2010-10-10T00:00:00Z"  
> datatype="xsd:dateTime"></div>
>         <div property="gr:validThrough" content="2010-10-10T23:59:59Z"  
> datatype="xsd:dateTime"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/godrelations/v1#Thursday"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Tuesday"></div>
>         <div rel="gr:hasOpeningHoursDayOfWeek"  
> resource="http://purl.org/goodrelations/v1#Monday"></div>
>       </div>
>     </div>
>
>
> You must add these two lines
>
>         <div property="gr:validFrom" content="2010-10-10T00:00:00Z"  
> datatype="xsd:dateTime"></div>
>         <div property="gr:validThrough" content="2010-10-10T23:59:59Z"  
> datatype="xsd:dateTime"></div>
>
> to any <div about="#..." typeof="gr:OpeningHoursSpecification"> block.
>
> The time interval can be of any size - a single day, a week, a month,  
> a year.
>
> In GoodRelations, you can attach validity to opening hour information,  
> offers, or any pricing information.
>
> Thus, consumers of your data do not have guess on how long your  
> promises will hold.
>
>
>>
>> 3.
>> Do any of the search engines use the opening times info to any  
>> visible effect yet? Is there anything else using opening times info  
>> at the moment?
>
> I don't know whether any of the top three search engines will be using  
> opening hours any time soon, but clearly, opening hours are extremely  
> valuable (and straightforward to implement) for location-based apps  
> and services.
>
> I expect many apps for smartphones to honor opening hour info shortly.
>
>
> Best
>
> Martin
>
>>
>> Thanks, Ben.
>>
>>
>> _______________________________________________
>> goodrelations mailing list
>> goodrelations at ebusiness-unibw.org
>> http://ebusiness-unibw.org/cgi-bin/mailman/listinfo/goodrelations
>





More information about the goodrelations mailing list