query-100346d0681789827746f99d2bc749b9

rq turtle/ttl

Calendar ordering of dates

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?month_ordinal ?monthLabel ?day_ordinal WHERE {
?month wdt:P31 wd:Q47018901; wdt:P1545 ?month_ordinal.
?day p:P361 [ps:P361 ?month; pq:P1545 ?day_ordinal ]
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY xsd:integer(?month_ordinal) xsd:integer(?day_ordinal)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?day") v2("?day_ordinal"):::projected v3("?month") v1("?month_ordinal"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c2(["wd:Q47018901"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v3 --"p:direct/P31"--> c2 v3 --"p:direct/P1545"--> v1 a1 --"p:statement/P361"--> v3 a1 --"p:qualifier/P1545"--> v2 v4 --"p:P361"--> a1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end