This function adds or substracts natural days (or working days) to/from any given date. Weekends will not be counted as working days.
addDaysSkippingWeekends(timestamp, numberOfDays, timeZone)
Parser expression | Description |
---|---|
addDaysSkippingWeekends({issue.duedate}, 2, LOCAL) | This function adds 2 days to the TIMESTAMP of the issue due date .
|
addDaysSkippingWeekends({issue.duedate}, -2, LOCAL) | This function substracts 2 days to the TIMESTAMP of the issue due date.
|
addDaysSkippingWeekends({issue.cf10100}, -6, USER_LOCAL) | This function substracts 6 days from the TIMESTAMP of a custom date-time field (with the ID 10100). Instead of the Jira server's local time this example uses the current user's time zone. |
Parameters used in this function
Parameter | Input (data type) | Description |
---|---|---|
timestamp | NUMBER | The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
numberOfDays | NUMBER | The number defined here will be the offset in days. Negative values are used to substract days. Internally JWT multiplies this value with the time macro |
timeZone | TIMEZONE | The time zone used for the calculation. Error rendering macro 'excerpt-include' No link could be created for 'Dates, times and timezones'. |
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.
This function returns a NUMBER representing a timestamp.
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 a JWT calculated date-time field.
This function adds or substracts natural days (or working days) to/from any given date. Weekends will not be counted as working days.
addDaysSkippingWeekends(timestamp, numberOfDays, timeZone)
Parser expression | Description |
---|---|
addDaysSkippingWeekends({issue.duedate}, 2, LOCAL) | This function adds 2 days to the TIMESTAMP of the issue due date . If the due date is set to a Monday the function will return a date-time for Wednesday. If the due date is set to a Friday the function will return a date-time for Tuesday. |
addDaysSkippingWeekends({issue.duedate}, -2, LOCAL) | This function substracts 2 days to the TIMESTAMP of the issue due date. If the due date is set to a Monday the function will return a date-time for Thursday. If the due date is set to a Friday the function will return a date-time for Wednesday. |
addDaysSkippingWeekends({issue.cf10100}, -6, USER_LOCAL) | This function substracts 6 days from the TIMESTAMP of a custom date-time field (with the ID 10100). Instead of the Jira server's local time this example uses the current user's time zone. |
Parameters used in this function
Parameter | Input (data type) | Description |
---|---|---|
timestamp | NUMBER | The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
numberOfDays | NUMBER | The number defined here will be the offset in days. Negative values are used to substract days. Internally JWT multiplies this value with the time macro |
timeZone | TIMEZONE | The time zone used for the calculation. Error rendering macro 'excerpt-include' No link could be created for 'Dates, times and timezones'. |
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.
This function returns a NUMBER representing a timestamp.
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 a JWT calculated date-time field.