[conradL@qimr13054 ~]$ stardog query grafli "select ?d where { BIND(
'''2015-06-25T12:00:00Z'''^^xsd:dateTime -
'''2015-06-25T11:30:30Z'''^^xsd:dateTime as ?d) } " Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks+------------------------------------------------------------------------+| d |+------------------------------------------------------------------------+| "P0DT0H29M30.000S"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration> |+------------------------------------------------------------------------+
Query returned 1 results in 00:00:00.051[conradL@qimr13054 ~]$ stardog query grafli "select ?d where { BIND(
'''2015-06-25T12:00:00Z'''^^xsd:dateTime -
'''2015-06-24T12:00:00Z'''^^xsd:dateTime as ?d) } " Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks+----------------------------------------------------------------------+| d |+----------------------------------------------------------------------+| "P1DT0H0M0.000S"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration> |+----------------------------------------------------------------------+
Query returned 1 results in 00:00:00.049[conradL@qimr13054 ~]$ stardog query grafli "select ?d where { BIND(
'''2015-06-25T12:00:00Z'''^^xsd:dateTime -
'''2015-05-25T12:00:00Z'''^^xsd:dateTime as ?d) } " Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks+----------------------------------------------------------------------+| d |+----------------------------------------------------------------------+| "P0DT0H0M0.000S"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration> |+----------------------------------------------------------------------+
Query returned 1 results in 00:00:00.043[conradL@qimr13054 ~]$ stardog query grafli "select ?d where { BIND(
'''2015-06-25T12:00:00Z'''^^xsd:dateTime -
'''2014-06-25T12:00:00Z'''^^xsd:dateTime as ?d) } " Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks+----------------------------------------------------------------------+| d |+----------------------------------------------------------------------+| "P0DT0H0M0.000S"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration> |+----------------------------------------------------------------------+
--
-- --
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
The javadocs don't specify, but it's possible the sun implementation is fine if the contract is that durations >= one month are not supported. But that'd be really unfortunate if it's the case.
groovy:000> import javax.xml.datatype.DatatypeFactory===> javax.xml.datatype.DatatypeFactorygroovy:000> f = DatatypeFactory.newInstance()===> com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl@e70f13agroovy:000> du32D = f.newDurationDayTime('P32DT0H0M0.000S')===> P32DT0H0M0.000Sgroovy:000> du32Dms = (long)(du32D.getValue() * 1000)===> 2764800000groovy:000> f.newDurationDayTime(du32Dms)===> P1DT0H0M0.000S