Temporal functions
now()​
Returns the current date and time including the timezone.
Function signature
now(): date and time
Examples
now()
// date and time("2020-07-31T14:27:30@Europe/Berlin")
today()​
Returns the current date.
Function signature
today(): date
Examples
today()
// date("2020-07-31")
day of week(date)​
Returns the day of the week according to the Gregorian calendar. Note that it always returns the English name of the day.
Function signature
day of week(date: date): string
day of week(date: date and time): string
Examples
day of week(date("2019-09-17"))
// "Tuesday"
day of year(date)​
Returns the Gregorian number of the day within the year.
Function signature
day of year(date: date): number
day of year(date: date and time): number
Examples
day of year(date("2019-09-17"))
// 260
week of year(date)​
Returns the Gregorian number of the week within the year, according to ISO 8601.
Function signature
week of year(date: date): number
week of year(date: date and time): number
Examples
week of year(date("2019-09-17"))
// 38
month of year(date)​
Returns the month of the week according to the Gregorian calendar. Note that it always returns the English name of the month.
Function signature
month of year(date: date): string
month of year(date: date and time): string
Examples
month of year(date("2019-09-17"))
// "September"
abs(n)​
Returns the absolute value of a given duration.
Function signature
abs(n: days and time duration): days and time duration
abs(n: years and months duration): years and months duration
Examples
abs(duration("-PT5H"))
// "duration("PT5H")"
abs(duration("PT5H"))
// "duration("PT5H")"
abs(duration("-P2M"))
// duration("P2M")
last day of month(date)​
Camunda Extension
Takes the month of the given date or date-time value and returns the last day of this month.
Function signature
last day of month(date: date): date
last day of month(date: date and time): date
Examples
last day of month(date("2022-10-01"))
// date("2022-10-31"))
last day of month(date and time("2022-10-16T12:00:00"))
// date("2022-10-31"))