Duration Definitions
Depending on how a duration parameter is expressed, it may be interpreted either as elapsed time, or as a number of working days.
- If the duration parameter is specified only in years, months, weeks, and/or days, but does not specify hours, minutes, or seconds, then it is assumed to be in working days. For example:
- When a deadline calculation is made in terms of working days, the calculation takes account of the
start-date-time to check whether the current day has enough working hours remaining to count as a working day (see
Minimum Hours in Working Day Calculations). If it does not, the next available business day is used as the first working day in the calculation. The final result will then be the
start of the first available day following the requested number of working days.
For example, if the working day is defined as being from 08:00 to 17:00, and minimum working hours value is defined as 5, a calculation with a start-date-time before 12:00 noon on the current day will treat the current day as a working day. If the duration is P1D, the calculation would return a deadline of the next business day at 08:00.
However if the start-date-time is after 12:00 noon on the current day, there are less than five hours remaining in the business day, and so there are no longer enough hours to count the current day as a working day. The calculation then treats the next business day as the first available working day, and the start of the working day after that would be returned as the deadline.
- If the duration parameter is specified only in hours, minutes, or seconds, then it is assumed to indicate elapsed time. So if the duration were PT72H then it would be taken to be 72 elapsed hours, not three working days.
- If days (or months, or years) is specified in combination with any of hours, minutes, or seconds, then the duration is taken to be elapsed time and a day is taken as 24 hours. For example, P3D1H would be 73 hours. P1D represents one working day; P1D1H is 25 hours.