Smart Value Date Format "Day of Week In Month" ("F")

Joe Kaiser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2024

I am trying to use smart values to get the number of the occurrence of the day of the week for the date in the month (ex: I am expecting the date 4/30/2024 to return as 5, as it is the 5th Tuesday of that month) using the Java DateTimeFormatter pattern of "F".

However, I am getting the value "2" returned and am quite confused.

I am testing this on 4/30/2024 using {{now.format("F")}}

1 answer

1 vote
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2024

Hi @Joe Kaiser ,

according to this article "F" means week-of-month.

https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html

And also "W" means week-of-month (huh?). So would you please try "W"?

Joe Kaiser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2024

W works as expected, though it does not quite do what I need here

For the month of May 2024, "W" returns 2 for the date 05/07/24, as it is the second week of the month. I believe "F" should return 1 instead in that case, as it is the first Tuesday of that month.

I have also tested this directly in Java, where it works as expected.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events