# startOfMonth and endOfMonth in Jira Automation: examples

URL: https://goingstellar.ro/reference/smart-values/startofmonth-endofmonth/

startOfMonth moves a date to the first day of its month and endOfMonth moves it to the last day. Use them for monthly report windows, billing cut-offs and due dates that must land on the 1st or the last day. Both keep the time of day, so chain toStartOfDay when you need midnight.

## Syntax

```
{{[date].startOfMonth}}
{{[date].endOfMonth}}
```

## Works on

- Fields: now, created, updated, duedate and any date or date-time value
- Returns: a date; a date-time keeps its time of day, a date-only field stays date-only

## Examples

```
{{now.startOfMonth}}
```

Start of the current month. The time of day of the run is kept, it is not reset to 00:00.

Result:

```
2026-11-01T16:02:39.1+0000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.endOfMonth}}
```

End of the current month, again with the time of day of the run.

Result:

```
2026-11-30T16:02:39.1+0000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.startOfMonth.toStartOfDay}}
```

Chains toStartOfDay to get the first day of the month at midnight.

Result:

```
2026-11-01T00:00:00.0+0000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.endOfMonth.toStartOfDay.format("yyyy-MM-dd")}}
```

A plain last-day-of-month date, ready to paste into a comment or a JQL string.

Result:

```
2026-11-30
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.plusMonths(1).startOfMonth.toStartOfDay.format("dd MMM yyyy")}}
```

The first day of next month in a readable format, for a note such as a renewal date.

Result:

```
01 Dec 2026
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.duedate.endOfMonth}}
```

With a due date of 2026-12-15, the last day of the due month. A date-only field gives a date-only result.

Result:

```
2026-12-31
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `{{now.startOfMonth}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `Returns the date and time of the start of the month.`, the actual result is `2026-11-01T16:02:39.1+0000`.
- `{{now.endOfMonth}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `Returns the date and time of the end of the month.`, the actual result is `2026-11-30T16:02:39.1+0000`.

## Pitfalls

- The time of day is not reset. `{{now.startOfMonth}}` run at 16:02 gives the first of the month at 16:02, not at 00:00 (checked on Jira Cloud, November 2026). Add `.toStartOfDay` when the time matters.
- `endOfMonth` is the last calendar day with the current time of day, not 23:59:59. Do not use it as an exclusive upper bound for a date-time comparison without normalising it first.
- Parentheses are tolerated: `{{now.startOfMonth()}}` and the misspelt `{{now.endOfmonth}}` both rendered a date instead of failing (checked on Jira Cloud, November 2026). A typo in capitalisation will not warn you, so copy the documented spelling.

## Related

- [withDayOfMonth(), withMonth() and other with… setters](https://goingstellar.ro/reference/smart-values/date-with/)
- [firstOfTheMonth(), lastOfTheMonth(), ofTheMonth()](https://goingstellar.ro/reference/smart-values/firstofthemonth-lastofthemonth/)
- [toStartOfDay, toCurrentTime and toDateTimeAt…](https://goingstellar.ro/reference/smart-values/tostartofday/)
- [plusDays() / minusDays() and other units](https://goingstellar.ro/reference/smart-values/date-plus-minus/)
- [toBusinessDay(), plusBusinessDays() and business-day helpers](https://goingstellar.ro/reference/smart-values/business-days/)

## 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/)

