XPath/XQuery current-date function

Summary

Returns the current date.

Signature

fn:current-date(
) as xs:date

Properties

This function is deterministic, context-dependent, and focus-independent. It depends on implicit-timezone.

Rules

Returns xs:date(fn:current-dateTime()). This is an xs:date (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-date is executed.

This function is . The precise instant during the query or transformation represented by the value of fn:current-date is implementation-dependent.

Examples

fn:current-date() returns an xs:date corresponding to the current date. For example, a call of fn:current-date() might return 2004-05-12+01:00.

Notes

The returned date will always have an associated timezone, which will always be the same as the implicit timezone in the dynamic context