Returns an xs:integer representing the "days" component of the canonical representation of the duration value supplied as argument.
XQuery, XSLT 2.0, XSLT 3.0.
The input value of type xs:duration.
The mapping illustrated below constructs the xs:dayTimeDuration of P2DT1H (2 days and 1 hours) and supplies it as input to the days-from-duration function. The result is 2.
XSLT 2.0 mapping
|Note:||If the duration is P1DT24H (1 day and 24 hours), the function returns 2, not 1. This is because the canonical representation of P1DT24H is actually P2D (2 days).|