XPath/XQuery date-greater-than function

Summary

Returns true if and only if the starting instant of $arg1 is greater than the starting instant of $arg2. Returns false otherwise.

Operator Mapping

Defines the semantics of the "gt" operator when applied to two xs:date values. Also used in the definition of the "le" operator.

Signature

op:date-greater-than(
$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 function call op:date-greater-than($A, $B) is defined to return the same result as op:date-less-than($B, $A)

Examples

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

The expression op:date-greater-than(xs:date("2004-12-25-12:00"), xs:date("2004-12-26+12:00")) returns false().