
fn.hoursFromTime( arg as (Number|String)? ) as Number?
Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.
If $arg is the empty sequence, returns the empty sequence.
| Parameters | |
|---|---|
| arg | The time whose hours component will be returned. |
fn.hoursFromTime(xs.time("11:23:00"))
=> 11
fn.hoursFromTime(xs.time("21:23:00"))
=> 21
fn.hoursFromTime(xs.time("01:23:00+05:00"))
=> 1
fn.hoursFromTime(
fn.adjustTimeToTimezone(
xs.time("01:23:00+05:00"),
xs.dayTimeDuration("PT0H")))
=> 20