Class FUN_dateTime
java.lang.Object
org.apache.jena.sparql.function.FunctionBase
fr.mines_stetienne.ci.sparql_generate.function.library.FUN_dateTime
- All Implemented Interfaces:
org.apache.jena.sparql.function.Function
public final class FUN_dateTime
extends org.apache.jena.sparql.function.FunctionBase
Binding function
fun:dateTime
converts a given datetime or a UNIX timestamp in milliseconds to an
xsd:dateTime.
See Live example
- args contains the supplied arguments such that
- the first argument is either a datetime (String) or a UNIX timestamp in milliseconds (String or integer);
- the second argument is optional. If provided contains the parsing format string in the ISO 8601 format according to universal time;
- if there is no second argument, the first argument must be a UNIX timestamp in milliseconds (String or integer);
- Result is a xsd:dateTime.
fun:dateTime(1453508109000) => "2016-01-23T01:15:09Z"^^http://www.w3.org/2001/XMLSchema#dateTime
fun:dateTime("1453508109000") => "2016-01-23T01:15:09Z"^^http://www.w3.org/2001/XMLSchema#dateTime
fun:dateTime("04/09/2018","dd/MM/yyyy") => "2018-09-04T00:00:00Z"^^http://www.w3.org/2001/XMLSchema#dateTime
fun:dateTime("2018-09-01T20:13:42Z", "ISO_DATE_TIME") => "2018-09-01T20:13:42Z"^^http://www.w3.org/2001/XMLSchema#dateTime
fun:dateTime("2018-09-01", "ISO_DATE") => "2018-09-01T00:00:00Z"^^http://www.w3.org/2001/XMLSchema#dateTime
- Since:
- 2018-09-05
- Author:
- El Mehdi Khalfi invalid input: '<'el-mehdi.khalfi at emse.fr>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckBuild(String uri, org.apache.jena.sparql.expr.ExprList args) org.apache.jena.sparql.expr.NodeValueMethods inherited from class org.apache.jena.sparql.function.FunctionBase
build, exec, exec
-
Field Details
-
URI
The SPARQL function URI.- See Also:
-
-
Constructor Details
-
FUN_dateTime
public FUN_dateTime()
-
-
Method Details
-
exec
- Specified by:
execin classorg.apache.jena.sparql.function.FunctionBase
-
checkBuild
- Specified by:
checkBuildin classorg.apache.jena.sparql.function.FunctionBase
-