Date and Calendar Functions
For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append.mdto anykestra.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) }}Was this page helpful?