Going Stellar

Home/Smart values reference

Jira Automation smart value

startOfMonth and endOfMonth in Jira Automation: examples

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 .

{{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 .

{{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 .

{{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 .

{{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 .

{{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 .

Where the documentation differs

  • {{now.startOfMonth}}

    Run on Jira Cloud, : 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, : 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.

Sources

  1. Jira smart values: date and time (Atlassian Support)
  2. Use smart values to manipulate and format dates (Atlassian Support)

Markdown version · All smart values