ProfessionalWiki / WikibaseEdtf

Wikibase extension that adds support for the Extended Date/Time Format (EDTF) via a new data type
https://wikibase.consulting/wikibase-edtf
GNU General Public License v2.0
7 stars 6 forks source link

Export does not always specify xsd:datetime for 'dumbed down' version of EDTF string #36

Open mzeinstra opened 6 months ago

mzeinstra commented 6 months ago

In my Wikibase the valid EDTF string XXXX maps correctly maps to +0000-00-00T00:00:00Z in xsd:datetime, but without the proper datatype in the export to Blazegraph. So "+0000-00-00T00:00:00Z" should be "+0000-00-00T00:00:00Z"^^xsd:dateTime

So this TTL should have an additional ^^xsd:dateTime

wd:Q483 a wikibase:Item ;
    wdt:P19 "XXXX"^^xsd:edtf,
        "+0000-00-00T00:00:00Z" ;
    wdt:P21 "1799"^^xsd:edtf,
        "1799-01-01T00:00:00Z"^^xsd:dateTime ;

This query:

SELECT DISTINCT ?date ?type
WHERE {
  BIND(wd:Q483 AS ?item)
  ?item wdt:P19 ?date.
  BIND(datatype(?date) AS ?type)
} 

should not yield

date type
+0000-00-00T00:00:00Z xsd:string
XXXX xsd:edtf