From b828a826770e8010377ae634913c7de7a4f64c90 Mon Sep 17 00:00:00 2001 From: Niels V Date: Wed, 2 May 2018 11:45:37 +0200 Subject: [PATCH] sparqlEscapeDate should insert a date (#11) Current sparqlEscapeDate inserts a datetime, which is not a valid xsd:date --- helpers/mu/sparql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/mu/sparql.js b/helpers/mu/sparql.js index ccef05a..3102101 100644 --- a/helpers/mu/sparql.js +++ b/helpers/mu/sparql.js @@ -38,7 +38,7 @@ function sparqlEscapeFloat( value ){ }; function sparqlEscapeDate( value ){ - return '"' + new Date(value).toISOString() + '"^^xsd:date'; + return '"' + new Date(value).toISOString().substring(0, 10) + '"^^xsd:date'; // only keep 'YYYY-MM-DD' portion of the string }; function sparqlEscapeDateTime( value ){