Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira smart values - date and time | last day of previous month

Jens Hoffmann August 30, 2023

Dear all,

which smart value can I use to display the last day of the previous month?

Unfortunately, this section did not help me because I always want to select {{now.lastOfTheMonth(now.minusMonths(1))}}. But I think a nesting does not work

Set the day component of the date

{{now.endOfMonth}}
{{now.startOfMonth}}
{{now.firstBusinessDayOfMonth}}
{{now.lastBusinessDayOfMonth}}

// Parameters: day of week (1-7) 
{{now.firstOfTheMonth(1)}}
{{now.lastOfTheMonth(1)}}

// Parameters: nth of month (1-5), day of week (1-7)
{{now.ofTheMonth(2, 1)}}

Helpsite: Jira smart values - date and time | Automation for Jira Data Center and Server 8.2 | Atlassian Documentation

Thanks a lot and kind regards, 

Jens

1 answer

1 accepted

2 votes
Answer accepted
Mark Segall
Community Champion
August 30, 2023

Hi @Jens Hoffmann - Have you tried this?

{{now.startofMonth.minusDays(1)}}
Jens Hoffmann August 30, 2023

Thanks Mark, output is 2023-07-31T06:39:37.5+0000

i set than

 {{now.startofMonth.minusDays(1).format("dd.MM.yyyy")}}

 for german format. 

Great :) 

Case closed...

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events