# plusDays() and minusDays() in Jira Automation: examples

URL: https://goingstellar.ro/reference/smart-values/date-plus-minus/

Each unit has a plus and a minus function: Millis, Seconds, Minutes, Hours, Days, Weeks, Months, Years and BusinessDays. They take a number and return the moved date, which you can chain or format. Typical uses are due dates, reminders and cut-offs.

## Syntax

```
{{date.plusDays(7)}}
{{date.minusMonths(1)}}
{{date.plus<Unit>(number)}}
```

## Arguments

- `number` (required: yes): How many units to add or subtract, as a whole number

## Works on

- Fields: due date and other date fields for days and longer units; date-time values for every unit
- Returns: a date or date-time

## Examples

```
{{issue.duedate.plusDays(7)}}
```

Postpones a due date by one week, keeping the date-only form.

Result:

```
2026-12-22
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.created.plusHours(48)}}
```

Calculates a 48-hour response deadline from the creation time.

Result:

```
2026-12-01T16:21:47.9+0000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.plusMinutes(30).shortTime}}
```

Gives the clock time of a reminder in half an hour, formatted for a message.

Result:

```
4:56 PM
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.plusDays(7).minusDays(2).jiraDate}}
```

Chains a plus and a minus, then formats the result for a date field.

Result:

```
2026-12-04
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.withMonth(1).withDayOfMonth(31).plusMonths(1).jiraDate}}
```

Starts from 31 January and adds a month, which lands on the last day of February.

Result:

```
2026-02-28
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.minusYears(1).jiraDate}}
```

Finds the same day one year ago, for a year-over-year comparison.

Result:

```
2025-11-29
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- The function name carries the unit in plural: `plusDays`, not `plusDay`. A misspelled name, a quoted number such as `plusDays("7")`, or no argument at all renders empty (checked on Jira Cloud, November 2026).
- Only whole units are added. `now.plusDays(1.5)` added one day, not a day and a half. A negative number works as a subtraction: `plusDays(-3)` went back three days.
- A date-only field such as the due date accepts days, weeks, months and years, but `minusHours()` and `plusMinutes()` on it render empty (checked on Jira Cloud, November 2026).
- Months are clamped to the end of the target month. 31 January plus one month is 28 February, not an error.

## Related

- [{{now}}](https://goingstellar.ro/reference/smart-values/now/)
- [diff()](https://goingstellar.ro/reference/smart-values/date-diff/)
- [toBusinessDay(), plusBusinessDays() and business-day helpers](https://goingstellar.ro/reference/smart-values/business-days/)
- [Date formats (jiraDate, format(), shortTime…)](https://goingstellar.ro/reference/smart-values/date-format/)
- [withDayOfMonth(), withMonth() and other with… setters](https://goingstellar.ro/reference/smart-values/date-with/)
- [startOfMonth and endOfMonth](https://goingstellar.ro/reference/smart-values/startofmonth-endofmonth/)

## Sources

- [Jira smart values: date and time (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/)
- [Use smart values to manipulate and format dates (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/)

