Camunda 8 - FEEL Temporals

Below one I referred in the partner academy FEEL-Temporals section

Getting the Week of the Year

week of year(date("2025-12-31"))

Result : 1

Question:
It will be the last week of the year right. How the answer will be 1 ?

Hi,

A week starts on Sunday and ends on Saturday…

The 31st is mid week which spans the new year…hence if you try 2025-12-27 you will get 52 as this is the last full week in the year…

Regards

Rob

1 Like

Thanks @Webcyberrob . But think about when I want to calculate my business logic dynamically based on this week function. Looks its quite hard to use in the use cases. Because my expected answer should be 2025 year week, Not 2026.

You could use an expression to get the semantics you want…

floor(day of year(date(“2025-12-31”))/7)

Regards

Rob

1 Like