Skip to main content
Version: 1.15

3.2 Temporal functions

Since Zee has 11 days to reach the CamundaCon, Zee decides to stay a bit longer in Cologne. 🇩🇪 For the last trip, Zee wants to take a train 🚅 to Berlin.

On the train schedule, there is a special train that leaves Cologne on each Monday morning. Zee looks at the calendar but is unsure about the current weekday.

Can you help him? Use temporal functions to resolve the current weekday.

Expression

// use a function to get the weekday of the current date
date(targetDate)

Context

A JSON document that is used to resolve variables in the expression.
{
  "targetDate": "2022-10-05",
  "remainingTime": "P11D"
}


Result

<click 'Evaluate' to see the result of the expression>

Warnings

<none>
Solution
It is Saturday. Zee can stay the weekend in Cologne.

Expression
day of week(date(targetDate) - duration(remainingTime))