Year function does not return anything on xsd:date

0 views
Skip to first unread message

nata...@gmail.com

unread,
Dec 4, 2015, 1:13:56 AM12/4/15
to Stardog
Hi,
 
I have 2 triples for a subject. One with object literal of type xsd:date and one xsd:dateTime.
 
If I execute the query
select ?o (datatype(?o) as ?dt) (year(?o) as ?y) where {
   app:c8f56879-9b02-412a-b1f0-7aedbca262d7 app:prop ?o.
  }
 2012-08-12                 ?xsd:date 
 2011-02-02T12:55:00 ?xsd:dateTime              2011

Is it a bug?

thx, N

nata...@gmail.com

unread,
Dec 4, 2015, 3:15:22 AM12/4/15
to Stardog, nata...@gmail.com

Ok. SPARQL specification does not mention xsd:date or xsd:time.
But it seems logical to support them I guess.

N

Evren Sirin

unread,
Dec 4, 2015, 9:09:53 AM12/4/15
to Stardog, Natan Cox
Yes, we were following the spec that only specifies dateTime but
XQuery also defines year-from-date and similar functions. We created
an issue (2694) to make dateTime functions work with date and time
datatypes where possible. Thanks for pointing this out.

Best,
Evren
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
Reply all
Reply to author
Forward
0 new messages