Loading TOC...

fn.hoursFromDuration

fn.hoursFromDuration(
   $arg as xs.duration?
) as Number?

Summary

Returns an xs:integer representing the hours component in the canonical lexical representation of the value of $arg. The result may be negative.

If $arg is the empty sequence, returns the empty sequence.

Parameters
$arg The duration whose hour component will be returned.

Example

fn.hoursFromDuration(xs.duration("P3DT10H"));
=> 10

Example

fn.hoursFromDuration(xs.duration("P3DT12H32M12S"));
=> 12

Example

fn.hoursFromDuration(xs.duration("PT123H"));
=> 3

Example

fn.hoursFromDuration(xs.duration("-P3DT10H"));
=> -10

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy