# op:add-dayTimeDurations

Adds $dayTimeDuration-var1 to $dayTimeDuration-var2.

### Signatures

op:add-dayTimeDurations(xf:dayTimeDuration $dayTimeDuration-var1, xf:dayTimeDuration $dayTimeDuration-var2) —> xf:dayTimeDuration

### Arguments

Data Type | Argument | Description
--- | --- | ---
xf:dayTimeDuration | $dayTimeDuration-var1 | Contains a time duration that can contain days, hours, minutes, and seconds.
xf:dayTimeDuration | $dayTimeDuration-var2 | Contains a time duration that can contain days, hours, minutes, and seconds.

### Returns

Returns the dayTimeDuration value of adding $dayTimeDuration-var1 to $dayTimeDuration-var2.

### Examples

#### Simple

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

    <dayTimeDuration>{
    	op:add-dayTimeDurations(xf:dayTimeDuration("P1DT2H30M5S"), xf:dayTimeDuration("PT31M"))
    }</dayTimeDuration>

The resulting dayTimeDuration value of 1 day, 3 hours, 1 minute, and 5 seconds is returned as shown in the following result:

    <dayTimeDuration>P1DT3H1M5S</dayTimeDuration>

Related Topics

W3C add-dayTimeDurations operator description.

W3C dayTimeDuration description.

xf:dayTimeDuration constructor description.