Skip to main content

Add working days

Move a date by a number of working days, skipping the weekend and holidays of a business calendar; a negative number moves back. The start date itself is not counted (1 from Friday is Monday) and 0 keeps the date. The time of day is kept.

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

Inputs​

InputTypeRequiredDefaultWhat it is
ValueDateTimeYesStart date.
DaysNumberYesWorking days to add, a whole number; negative to go back.
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.
Time zoneStringNoUTCTime zone whose calendar date counts; the time of day is kept in this zone.

Outputs​

OutputTypeWhat it is
resultDateTimeThe date that many working days later (or earlier).