OK. One more question - most of the examples I was looking at (like the one from StackOverflow) use simple integer values like "11"^^xsd:gMonth, and not the "--11"^^xsd:gMonth syntax. But strictly speaking, these are illegal values?
On Thu, Nov 14, 2013 at 9:11 PM, Andy Seaborne <a...@apache.org> wrote: > On 14/11/13 18:29, Martynas Jusevičius wrote: >> >> BTW, there seems to be a related question on StackOverflow: >> >> http://answers.semanticweb.com/questions/610/ordering-by-time-in-sparql-query >> >> I might just give up building an xsd:dateTime and use separate >> year/month/day components. >> >> On Thu, Nov 14, 2013 at 7:26 PM, Martynas Jusevičius >> <marty...@graphity.org> wrote: >>> >>> Andy, now I'm confused. Where are you looking? > > > My mistake - I just grepped for "month" and didn't look carefully enough. > > gMonth and friends are OK to parse, albeit a syntax that people don't engage > with. But my experience all date/times formats suffer from bad data if not > machine generated, whether xsd, RFC or whatever. > > >>> I checked the RDF/XML >>> version of Time ontology and it says: >>> >>> <owl:DatatypeProperty rdf:ID="year"> >>> <rdfs:domain rdf:resource="#DateTimeDescription" /> >>> <rdfs:range rdf:resource="&xsd;gYear" /> >>> </owl:DatatypeProperty> >>> >>> <owl:DatatypeProperty rdf:ID="month"> >>> <rdfs:domain rdf:resource="#DateTimeDescription" /> >>> <rdfs:range rdf:resource="&xsd;gMonth" /> >>> </owl:DatatypeProperty> >>> >>> <owl:DatatypeProperty rdf:ID="day"> >>> <rdfs:domain rdf:resource="#DateTimeDescription" /> >>> <rdfs:range rdf:resource="&xsd;gDay" /> >>> </owl:DatatypeProperty> >>> >