This function adds or subtracts days to or from any given date.
Syntax
addDays(timestamp, numberOfDays, timeZone) #Output: Number
Use cases and examples
Use case |
---|
No content found. |
This function adds or subtracts days to or from any given date.
addDays(timestamp, numberOfDays, timeZone) #Output: Number
Parser expression | Description |
---|---|
%{addDays({issue.dueDate}, 2, RUN_AS_LOCAL)} | This example adds 2 days to the issue's due date. |
%{addDays({issue.dueDate}, -2, RUN_AS_LOCAL)} | This example subtracts 2 days from the issue's due date. |
%{dateTimeToString(addDays(1582930800000, -2, "Europe/Berlin"), "MMMM D YYYY, h:mm:ss a","es")} | This example subtracts 2 days from a timestamp which represents February 29th, 2020. The obtained result is February 27th, 2020 12:00:00 am. The result is formatted using the function dateTimeToString() |
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). |
| NUMBER | The offset in days. Negative values are used to subtract days. |
timeZone | TEXT | The time zone used for the calculation. |
This function returns a NUMBER representing a timestamp
The output can be written into any Jira field of type Date Picker or Date Time Picker.
Use case |
---|
No content found. |
Powered by Atlassian Confluence 8.5.7, themed by Refined 7.5.3 and Decadis AG