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")}}
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"?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.