Extracts the number of minutes from the minutes component of $dayTimeDuration-var.
If the value of $dayTimeDuration-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.
xf:get-minutes-from-dayTimeDuration(xf:dayTimeDuration? $dayTimeDuration-var) —> xs:integer?
Contains a representation of a time duration which can contain days, hours, minutes, and seconds. |
Returns the number as minutes as an integer from minutes component of $dayTimeDuration-var.
<minutes>{xf:get-minutes-from-dayTimeDuration(xf:dayTimeDuration("P7DT9H12M65S"))}</minutes>
The preceding query generates the following result:
<minutes>12</minutes>
Note: Even though 65 seconds is specified in the seconds component (65S) of the dayTimeDuration creation string (adding up to an additional minute), only 12 minutes are returned as originally specified by the minutes component (12M).
<minutes>{xf:get-minutes-from-dayTimeDuration(xf:dayTimeDuration("-PT3M"))}</minutes>
The preceding query generates the following result:
<minutes>-3</minutes>
<minutes>{xf:get-minutes-from-dayTimeDuration(xf:dayTimeDuration("P2DT20S"))}</minutes>
The preceding query generates the following result:
<minutes>0</minutes>
W3C get-minutes-from-dayTimeDuration function description.
W3C dayTimeDuration data type description.