[F&O] C.6 Working With xs:duration Values

The XQuery version should shortened to:

declare function eg:duration-equal($arg1 as xs:duration, $arg2 as 
xs:duration)
     as xs:boolean
{
   return ( ( cast as xdt:yearMonthDuration($arg1) eq
              cast as xdt:yearMonthDuration($arg2) )
            and
            ( cast as xdt:dayTimeDuration($arg1) eq
              cast as xdt:dayTimeDuration($arg2) )
}

Till Westmann

Received on Saturday, 14 February 2004 05:46:23 UTC