Abstract
This code snippet adds a certain number of days to a Date/Date-Time picker field.
Logic
Access the Date/Date-Time picker field and add the number of days to it.
SnippetĀ
<Date Object> + <Number of days>
Placeholders
Placeholder | Description | Example |
---|---|---|
<Date Object > | Access a date field | issue.get("created") |
<Number of days> | The number of days to be added | 5 |
Examples
The output of this code snippet is a Timestamp which you could use in a Groovy expression, for example to:
Calculate and display a date field to issue created plus 5 days
issue.get("created") + 5
Calculate and display a "Planned Delivery Date" as the 10 days from today
new Date() + 10
References
Related articles