Page History
UI Text Box | ||||
---|---|---|---|---|
| ||||
This function adds or subtracts natural days (or working days) to or from any given date. Weekends will notbecounted as working days. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
addDaysSkippingWeekends(timestamp, numberOfDays, timeZone) #Output: Number |
UI Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|
UI Expand | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
Parameters used in this function
|
hidden | true |
---|
Status | ||
---|---|---|
|
Status | ||
---|---|---|
|
Status | ||
---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Page properties | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Short description | Timestamp equivalent of any given day plus an offset of n days where weekends don't count. |
| ||||||||||||||
|
UI Expand | ||||
---|---|---|---|---|
| ||||
size | medium | type | infoThis function returns a |
|
UI Text Box | ||||
---|---|---|---|---|
| ||||
Variant of the function where you can additionally define the start and the end of the weekend. This function is useful when the non-working days differ from the standard (Saturday/Sunday). |
Code Block | ||||
---|---|---|---|---|
Code Block | ||||
| ||||
| ||||
addDaysSkippingWeekends(timestamp, numberOfDays, timeZone, daysstartOfWeekend, time_zone)endOfWeekend) #Output: Number |
UI Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
UI Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Info |
---|
If t represents a timestamp which coincides with a Friday, adding n = 1 will return a date-time for the following Monday. Negative values for n are used in order to subtract days to t. Note: n cannot be higher than 50000. |
Parameters used in this function
Parameter | Input (data type) | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
timestamp |
| The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). | ||||||||
numberOfDays |
| The offset in days. Negative values are used to subtract days. Internally JWT multiplies this value with the time macro | ||||||||
timeZone |
| The time zone used for the calculation. | ||||||||
startOfWeekend |
| Valid values are {MONDAY} , {TUESDAY} ... {SUNDAY} . | ||||||||
endOfWeekend |
| Valid values are {MONDAY} , {TUESDAY} ... {SUNDAY} . |
UI Text Box | ||
---|---|---|
| ||
Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. |
UI Expand | ||||
---|---|---|---|---|
| ||||
UI Text Box | ||||
size | medium | type | infoThis function returns a |
|
UI Text Box | ||
---|---|---|
| ||
The output can be written into any Jira field of type Date Picker ore Date Time Picker. Another very common use case is to use this function in one of the JWT calculated date-time fields. If you want to subtract two date-time values you might want to have a look at the function subtractDatesSkippingWeekends(). |
Use cases and examples
Page properties report | ||||||
---|---|---|---|---|---|---|
|
Page properties | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||
|
Page properties | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
|
Code Block | ||
---|---|---|
| ||
addDaysSkippingWeekends(timestamp, sadasdsad, xxx) |
UI Expand | ||||
---|---|---|---|---|
| ||||
UI Expand | ||||
| ||||
Parameter explanation.... Output asdsadasdas Info | If t represents a timestamp which coincides with a Friday, adding n = 1 will return a date-time for the following Monday. Negative values for n are used in order to subtract days to t. Note: n cannot be higher than 50000. |