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:
Function
public final class FUN_dateTime extends 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
-
-
Constructor Summary
Constructors Constructor Description FUN_dateTime()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkBuild(String uri, ExprList args)
NodeValue
exec(List<NodeValue> args)
-
Methods inherited from class org.apache.jena.sparql.function.FunctionBase
build, evalArgs, exec, exec
-
-
-
-
Field Detail
-
URI
public static final String URI
The SPARQL function URI.- See Also:
- Constant Field Values
-
-
Method Detail
-
exec
public NodeValue exec(List<NodeValue> args)
- Specified by:
exec
in classFunctionBase
-
checkBuild
public void checkBuild(String uri, ExprList args)
- Specified by:
checkBuild
in classFunctionBase
-
-