Skip to content

Commit b828a82

Browse files
nvdkerikap
authored andcommitted
sparqlEscapeDate should insert a date (#11)
Current sparqlEscapeDate inserts a datetime, which is not a valid xsd:date
1 parent c667a09 commit b828a82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: helpers/mu/sparql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function sparqlEscapeFloat( value ){
3838
};
3939

4040
function sparqlEscapeDate( value ){
41-
return '"' + new Date(value).toISOString() + '"^^xsd:date';
41+
return '"' + new Date(value).toISOString().substring(0, 10) + '"^^xsd:date'; // only keep 'YYYY-MM-DD' portion of the string
4242
};
4343

4444
function sparqlEscapeDateTime( value ){

0 commit comments

Comments
 (0)