XPath/XQuery date-equal function

Summary

Returns true if and only if the starting instants of the two supplied xs:date values are the same.

Operator Mapping

Defines the semantics of the "eq" operator when applied to two xs:date values. Also used in the definition of the "ne", "le" and "ge" operators.

Signature

op:date-equal(
$arg1 as xs:date,
$arg2 as xs:date
) as xs:boolean

Properties

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

Rules

The starting instant of an xs:date is the xs:dateTime at time 00:00:00 on that date.

The function returns the result of the expression:

op:dateTime-equal(xs:dateTime($arg1), xs:dateTime($arg2))

Examples

The expression op:date-equal(xs:date("2004-12-25Z"), xs:date("2004-12-25+07:00")) returns false().

The expression op:date-equal(xs:date("2004-12-25-12:00"), xs:date("2004-12-26+12:00")) returns true().