functx:dayTimeDuration

Construct a dayTimeDuration from a number of days, hours, etc.

Description

The functx:dayTimeDuration function constructs an xs:dayTimeDuration value from arguments representing the number of days, hours, minutes and seconds. Zero can be represented either by the number 0 or the empty sequence. If all arguments are zero or the empty sequence, it returns P0M.

Parameters

Description

days:numeric()

the number of days

hours:numeric()

the number of hours

minutes:numeric()

the number of minutes

seconds:numeric()

the number of seconds

Examples

XPath

Results

functx:dayTimeDuration(1,6,0,0)

P1DT6H

functx:dayTimeDuration(2.5,0,0,0)

P2DT12H

functx:dayTimeDuration(1,(),3,5.6)

P1DT3M5.6S

functx:dayTimeDuration(0,0,5,0)

PT5M

functx:dayTimeDuration(0,0,0,0)

PT0S

Depends On

See Also