Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using Connectors
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

days-from-duration

days-from-duration

Returns the number of days in a duration.

Syntax

fn:days-from-duration(arg)
The following table describes the argument for this command:
Argument
Required/
Optional
Description
arg
Required
The duration value from which the days component is to be extracted.
The duration-value is an empty sequence, or is a value that has one of the following types:
  • xs:dayTimeDuration
  • xs:duration
  • xs:yearMonthDuration

Return Value

  • If duration-value is of type xs:dayTimeDuration or is of type xs:duration, the returned value is of type xs:integer, and is the days component of duration-value cast as xs:dayTimeDuration.
  • If duration-value is of type xs:yearMonthDuration, the returned value is 0.
  • If duration-value is an empty sequence, the returned value is an empty sequence.
  • If duration-value is negative, the returned value is negative.

Example

The following expression returns the days from the duration:
fn:days-from-duration(xs:dayTimeDuration('DURATION'))
The following table lists some sample values and return values:
DURATION
RETURN VALUE
P5D
5
-PT24H
-1
PT23H
0
P1DT36H
2
PT1440M
1

0 COMMENTS

We’d like to hear from you!