op:add-dayTimeDuration-to-time

Adds $dayTimeDuration-var to the time specified by $time-var.

Signatures

op:add-dayTimeDuration-to-time(xs:time $time-var, xf:dayTimeDuration $dayTimeDuration-var) —> xs:time

Arguments

Data Type
Argument
Description

xs:time

$time-var

Contains a representation of the time.

xf:dayTimeDuration

$dayTimeDuration-var

Contains a time duration that can contain days, hours, minutes, and seconds.

Returns

Returns the time result of adding the date and time specified by $dayTimeDuration-var to time specified by $time-var. The returned time value has the same timezone as $time-var. If $time-var has no timezone, then the returned time value has the no timezone.

Examples

Simple

The following example query adds a dayTimeDuration value equal to 1 day, 2 hours, 30 minutes, and 5 seconds to a time value equal to the time: 1:00 AM as shown in the following query:

<time>{
	op:add-dayTimeDuration-to-time(xs:time("01:00:00"), xf:dayTimeDuration("P1DT2H30M5S"))
}</time> 

The resulting time value equal to the time: 3:30:05 AM is returned as shown in the following result:

<time>03:30:05</time> 

Related Topics

W3C add-dayTimeDuration-to-time operator description.

W3C dayTimeDuration description.

xf:dayTimeDuration constructor description.

W3C time data type description

xs:time constructor description.