Skip to main content
Version: 1.20 (unreleased)

Chapter 5

The next stop would put Zee in Cologne 🇩🇪, as the journey continued there was an important question to answer: would Zee get in time for the conference? ⌚

The trip started on September 15th, 2022, and since the journey began, around 200 hours had passed. CamundaCon will start on October 5th, 2022.

Let's use temporal operators to check how many days Zee has left:

Expression

// use temporal math to calculate the remaining days
date(startingDate) + duration("PT200H")

Context

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


Result

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

Warnings

<none>
Solution
Zee has 11 days to arrive in Berlin.

Expression
(date(targetDate) - date(startingDate) - duration("PT200H")) / duration("P1D")