Question
Could you please tell me how to get the ordinal number of the week of the month for a given date? The standard functionality only allows getting the ordinal number of the week of the year for a given date.
Answer
The ordinal number of the week of the year can be obtained as follows:
=: $date_w - $date_m + 1
date_w: dateFormat(date: $#nd; format: "W")
date_m: dateFormat(date: $firstday_m; format: "W")
firstday_m: dateFormat(date: $#nd; format: "Y-m-01")