XPath/XQuery date-less-than function

Summary

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

Operator Mapping

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

Signature

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

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-less-than(xs:dateTime($arg1), xs:dateTime($arg2))

Examples

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

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