For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append .md to any kestra.io/docs/* URL for plain Markdown.

Use these functions when you need to make scheduling or routing decisions based on the calendar — for example, skipping runs on weekends or public holidays.

isWeekend()

Returns true if the date falls on Saturday or Sunday:

{{ isWeekend(trigger.date) }}

isPublicHoliday()

Checks against a country’s public holiday calendar. countryCode is an ISO 3166-1 alpha-2 code; subDivision is optional and accepts ISO 3166-2 codes:

{{ isPublicHoliday(trigger.date, 'US') }}
{{ isPublicHoliday(trigger.date, 'DE', 'DE-BY') }}

isDayWeekInMonth()

Returns true if the date is the Nth occurrence of the given weekday in its month. position accepts FIRST, SECOND, THIRD, FOURTH, or LAST:

{{ isDayWeekInMonth(trigger.date, 'MONDAY', 'FIRST') }}

isLastWorkingDay()

Returns true if the date is the last working day of its month. Working days default to Monday–Friday. An optional second argument overrides which days count as working days using a comma-separated list of uppercase day names:

{{ isLastWorkingDay(trigger.date) }}
{{ isLastWorkingDay(trigger.date, 'MONDAY,TUESDAY,WEDNESDAY,THURSDAY') }}

The date argument accepts any ISO 8601 date or datetime string. Combine with isPublicHoliday() if you also need to exclude public holidays.

dayOfWeek()

Returns the uppercase day name such as MONDAY:

{{ dayOfWeek(trigger.date) }}

dayOfMonth()

Returns the day of the month as an integer (1–31):

{{ dayOfMonth(trigger.date) }}

monthOfYear()

Returns the month as an integer (1–12):

{{ monthOfYear(trigger.date) }}

hourOfDay()

Returns the hour as an integer (0–23):

{{ hourOfDay(execution.startDate) }}

isDateBetween()

Available on:

v>=2.0.4Open Source EditionEnterprise EditionCloud

Returns true if the date is strictly after the first bound and strictly before the second:

{{ isDateBetween(trigger.date, '2025-12-31T23:59:59Z', '2026-06-30T23:59:59Z') }}

The values are compared as instants, so bounds written with different offsets still compare correctly. Give every value an explicit offset (Z or ±HH:MM): a datetime without one raises an error.

Was this page helpful?