Inrupt client library returning null for dates

As the title says, I create a thing with this code using the Inrupt client libraries:

const newEntry = buildThing(createThing({name: newEntryName}))
    .setStringNoLocale("http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#className", aString)
    .setDate("http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#date", aDate)
    .setStringNoLocale("http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#message", anotherString)
    .setUrl("http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#resource", aURL)
    .build();

When I get the properties back from the thing everything works but the date. If I use getDate() or getDatetime() I get null, I even tried string, but I still get null.

The data for the date in the Pod is: rlog:date "2021-8-9Z"^^xsd:date;.

Am I doing something wrong or is this a bug?

That indeed looks like a bug, so you might want to report it (and mention against which server you were trying it).

2 Likes

I just reported it. Thanks for the tip!

I’ve recreated it @nicomedia and suggested a fix for it. For anyone else, for the moment, addDatetime and getDatetime look like they’re functioning correctly.