Hi there
I have a question regarding xsd date formats (no worries, timezones are not part of question ... ;-)).
Given some data (see upload below) using dates with different precisions (day, month, year) , I'd like to do searches with arbitrary precisions:
PREFIX schema: <http://schema.org/>
SELECT distinct ?proj ?projName ?projStarted WHERE {
?proj a schema:ResearchProject .
?proj schema:startDate ?projStarted ;
schema:name ?projName .
FILTER(?projStarted > "2019-03"^^xsd:gYearMonth)
}
Given three projects with the dates 2019-03-01^^xsd:date
, 2019^^xsd:gYear
, and 2019-11^^xsd:gYearMonth
I get the results:
http://www.example.com/project-1 | test project 1 | 2019-03-01 |
---|---|---|
http://www.example.com/project-3 | test project 3 | 2019-11 |
What are the rules applied here to compare dates with different precisions? Is this specific to Stardog or are there defined relations in the specs between xsd:date
, xsd:gYearMonth
, and xsd:gYear
?
I understand why 2019 does not show up, but why does 2019-03-01?
Thanks a lot for any hint. Dates seem a simple thing but in fact they are not (thinking of calendars)
data.json (789 Bytes)