http://www.zorba-xquery.com/modules/datetime ZC

Module Description
Before using any of the functions below please remember to import the module namespace:
import module namespace datetime = "http://www.zorba-xquery.com/modules/datetime";

This module provides functions to retrieve the current dateTime. In contrast to the current-dateTime functions specified in "XQuery Functions and Operators" the functions in this module are nondeterministic. That is, they do not return the current-dateTime from the dynamic context but return the actual value.

Author:

Matthias Brantner

XQuery version and encoding for this module:

xquery version "3.0" encoding "utf-8";

Module Resources
  • the XQuery module can be found here.
Related Documentation

For more details please also see:

Namespaces
ann http://www.zorba-xquery.com/annotations
datetime http://www.zorba-xquery.com/modules/datetime
ver http://www.zorba-xquery.com/options/versioning
Function Summary
current-date ( ) as xs:date external
Return the current date value.
current-dateTime ( ) as xs:dateTime external
Return the current dateTime value.
current-time ( ) as xs:time external
Return the current time value.
timestamp ( ) as xs:long external
Return the the number of milliseconds since the Epoch.
Functions
current-date back to 'Function Summary'
declare %ann:nondeterministic function datetime:current-date (
 ) as xs:date external

Return the current date value. Please note, that this function is not stable. It returns the dat value of the date the function has been actually invoked.

Returns:
  • the non-stable date value

current-dateTime back to 'Function Summary'
declare %ann:nondeterministic function datetime:current-dateTime (
 ) as xs:dateTime external

Return the current dateTime value. Please note, that this function is not stable. It returns the dateTime value of the date and time the function has actually been invoked.

Returns:
  • the non-stable datetime value

current-time back to 'Function Summary'
declare %ann:nondeterministic function datetime:current-time (
 ) as xs:time external

Return the current time value. Please note, that this function is not stable. It returns the time value of the date and time the function has actually been invoked.

Returns:
  • the non-stable time value

timestamp back to 'Function Summary'
declare %ann:nondeterministic function datetime:timestamp (
 ) as xs:long external

Return the the number of milliseconds since the Epoch.

Returns:
  • the said number of milliseconds.

blog comments powered by Disqus