How to use operators in date variables?
Background
The date variables in ARN templates like [releaseDate], [sprintStartdate], [sprintEnddate], etc are replaced by their actual values (date) as fetched from Jira. However, there are ample use cases where users want to manipulate this date on the go and then use the calculated value in the ARN template.
For example, what if I want to include the number of days remaining for release or a date that is 15 days prior to the version release date which is basically our QA release date? In such a scenario system allows me to use some operators with the date type variables and display the calculated date in release notes.
Here is an example of how the value of [releaseDate] variable can be used with different operators.
Syntax
The syntax used to indicate the use of an operator in the date variable would be as follows
Date variable without any operator | Date variable with operator |
---|---|
[dateVariable] | [dateVariable|operatorName] |
This will be replaced by actual date returned from Jira. | This will be replaced by the returned value after the calculations done based on the selected operator. |
Operators
Below table explains the type of operators we support with some simple examples that will help you to understand how you can use these operators along with the date type variables.
Operator | Syntax | Calculations |
---|