Skip to main content

Count working days

Count the working days between two dates in a business calendar: the days after the start up to and including the end (the start too, when chosen). The count is negative when the end is before the start.

Command in the Date and time toolkit · id ooa.datetime/working_days_between · 7 inputs (2 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
StartDateTimeYesFirst date.
EndDateTimeYesLast date.
CalendarStringNoName of a holiday calendar in One CommandCenter (its holidays and weekend). Read once per run as the run's user; needs the agent to run from One CommandCenter. Leave empty to give the holidays and weekend here.
HolidaysListNoDates that are not working days, as yyyy-MM-dd, e.g. ["2026-12-25"]. Added to the calendar's dates when a calendar is named too.
WeekendStringNoDays of the week that are not working days, e.g. SAT,SUN (the default) or FRI,SAT; NONE when every day is a working day. When given with a calendar, it replaces the calendar's weekend.
Include startBooleanNofalseCount the start date too when it is a working day (Monday to Friday of one week is then 5, not 4).
Time zoneStringNoUTCTime zone whose calendar date counts.

Outputs​

OutputTypeWhat it is
resultNumberNumber of working days.