Workflow action
Dates & business calendar
ut_dates
Business days around holidays, SLA due times in working hours across time zones and DST, durations and ages, recurring schedules and fiscal periods.
About
What it does
Dates & business calendar handles the date rules that decide deadlines. Add or subtract business days around weekends and your holiday list, and compute an SLA due time from a start moment and a number of working hours: only working hours on working days count, in the time zone of the team, with daylight-saving changes handled because working hours are wall-clock times. The result comes back as a UTC instant and as local time with its offset.
It also measures durations (calendar days, business days, hours, a readable "2 years, 3 months" text and an exact age), converts a moment between time zones, lists the next occurrences of a schedule such as "the last Friday of every month at 16:00 London time", and finds the fiscal year, quarter and period of a date for a fiscal year that starts in any month, with the period, quarter and year boundaries and a label like FY2027 Q2.
Good for
- Set a due date 8 working hours after a ticket arrives, in the support team's time zone
- Pay an invoice 10 business days after approval, skipping public holidays
- Tag records with the fiscal year and quarter for reporting
After installing
- Install the package: the action appears in Extensibility → Workflow actions and in the workflow designer's palette under Custom actions.
- Drag Dates & business calendar onto a workflow, choose the function and map its inputs; keep holidays in a data table or variable and map the list into Holidays.
- Use the outputs from the data picker, e.g. {{sla_due}} for a Set SLA or Pause Until step, or {{fiscal_label}} in a title.
- Try the included "Business-hours SLA (sample)" workflow from the API or its start form: it computes a due time in Pacific/Auckland working hours and the business days until then.
Examples
Real inputs, real outputs
Each example ran in the sandbox when this gallery was built; the outputs are exactly what the step returns.
8 working hours from Friday afternoon sla_due
1.5 hours on Friday, the rest on Monday.
Inputs
{
"start": "2026-11-06T15:30:00",
"hours": 8,
"working_hours": "09:00-17:00",
"time_zone": "Pacific/Auckland"
}Outputs
{
"due": "2026-11-09T02:30:00.000Z",
"due_local": "2026-11-09T15:30:00+13:00",
"due_date": "2026-11-09",
"start_local": "2026-11-06T15:30:00+13:00",
"calendar_hours": 72
}3 business days over Christmas add_business_days
Inputs
{
"date": "2026-12-23",
"days": 3,
"holidays": [
"2026-12-25",
"2026-12-28",
"2027-01-01"
]
}Outputs
{
"date": "2026-12-30",
"weekday": "Wednesday",
"calendar_days": 7
}Fiscal quarter (year from July) fiscal_period
Inputs
{
"date": "2026-11-01",
"start_month": 7
}Outputs
{
"fiscal_year": 2027,
"quarter": 2,
"period": 5,
"label": "FY2027 Q2",
"period_label": "FY2027 P05",
"period_start": "2026-11-01",
"period_end": "2026-11-30",
"quarter_start": "2026-10-01",
"quarter_end": "2026-12-31",
"year_start": "2026-07-01",
"year_end": "2027-06-30",
"day_of_year": 124
}Last Friday of the month at 16:00 London next_occurrence
Inputs
{
"frequency": "monthly",
"nth_week": "last",
"weekday": "Friday",
"time": "16:00",
"time_zone": "Europe/London",
"after": "2026-11-01T00:00:00Z",
"count": 3
}Outputs
{
"next": "2026-11-27T16:00:00.000Z",
"next_local": "2026-11-27T16:00:00+00:00",
"occurrences": [
"2026-11-27T16:00:00.000Z",
"2026-12-25T16:00:00.000Z",
"2027-01-29T16:00:00.000Z"
],
"occurrences_local": [
"2026-11-27T16:00:00+00:00",
"2026-12-25T16:00:00+00:00",
"2027-01-29T16:00:00+00:00"
]
}Age on a date duration
Inputs
{
"from": "1990-07-15",
"to": "2026-11-01"
}Outputs
{
"days": 13258,
"business_days": 9470,
"hours": 318192,
"minutes": 19091520,
"human": "36 years, 3 months, 17 days",
"age_years": 36,
"age_months": 3,
"age_days": 17
}Reference
Functions, inputs and outputs
The designer generates each function's input panel from these declarations; outputs appear in the data picker with their types.
Add business days add_business_days
Add (or with a negative number, subtract) business days to a date, skipping weekends and holidays. Adding 0 returns the date itself, or the next business day when it falls on a weekend or holiday.
Inputs
datedate · required — The starting date (YYYY-MM-DD).daysinteger · required — How many business days to add; negative to go back.weekend_dayslist of strings — Days that are not business days (names such as Saturday, or ISO numbers 1 = Monday … 7 = Sunday).holidayslist of strings — Dates that are not business days, as YYYY-MM-DD (a list, or one per line).
Outputs
datedate — The resulting business day.weekdaystring — Monday … Sunday.calendar_daysinteger — Calendar days between the start and the result (negative when going back).
SLA due time sla_due
The moment a number of working hours after a start time runs out, counting only working hours on working days in a time zone and skipping holidays. Daylight-saving changes are handled: working hours are wall-clock times.
Inputs
startdate & time · required — When the clock starts (ISO 8601). Without Z or an offset it is local time in Time zone.hoursnumber · required — The SLA in working hours (decimals allowed, e.g. 0.5).working_hoursstring — Start and end of the working day, e.g. 09:00-17:00 (use 00:00-24:00 for round the clock).working_dayslist of strings — Weekdays that have working hours (names or ISO numbers 1–7).time_zonestring — IANA time zone of the working hours and holidays.holidayslist of strings — Dates that are not business days, as YYYY-MM-DD (a list, or one per line).
Outputs
duedate & time — The due moment as an ISO 8601 UTC instant.due_localstring — The due moment in the time zone, with its offset, e.g. 2026-11-09T14:30:00+13:00.due_datedatestart_localstring — The start in the time zone, with its offset.calendar_hoursnumber — Elapsed real time from start to due, in hours.
Duration / age duration
The time between two dates or date-times: calendar days, business days, hours and minutes, a readable text and the age in years, months and days. Negative when To is before From.
Inputs
fromdate & time · required — Date (YYYY-MM-DD) or date-time.todate & time — Date or date-time; empty for now.time_zonestring — Time zone for dates and times without an offset, and for counting calendar days.weekend_dayslist of strings — Days that are not business days (names such as Saturday, or ISO numbers 1 = Monday … 7 = Sunday).holidayslist of strings — Dates that are not business days, as YYYY-MM-DD (a list, or one per line).
Outputs
daysinteger — Whole calendar days.business_daysinteger — Business days after From up to and including To.hoursnumber — Elapsed hours (2 decimals).minutesinteger — Elapsed whole minutes.humanstring — For example "36 years, 3 months, 17 days" or "2 hours, 15 minutes".age_yearsinteger — Whole years (age).age_monthsinteger — Months after the whole years.age_daysinteger — Days after the whole months.
Convert time zone convert_timezone
Show a moment in another time zone: the UTC instant, the local date-time with its offset, date, time and weekday.
Inputs
datetimedate & time · required — ISO 8601. Without Z or an offset it is read in From zone.from_zonestring — IANA time zone of a date-time without an offset.to_zonestring · required — IANA time zone to show the moment in.
Outputs
isodate & timelocalstring — With its offset, e.g. 2026-11-03T03:00:00+13:00.local_datedatelocal_timestring — HH:mm.weekdaystringoffsetstring — For example +13:00.offset_minutesinteger
Next occurrences next_occurrence
The next dates of a recurring schedule: daily, weekly on chosen days, monthly on a day of the month or the nth weekday (e.g. last Friday), or yearly, every N periods, at a time of day in a time zone.
Inputs
frequencychoice · daily / weekly / monthly / yearly — How often it repeats.intervalinteger — Repeat every N days / weeks / months / years.days_of_weeklist of strings — Weekly: the days (names or ISO numbers); default the weekday of Start.day_of_monthinteger — Monthly / yearly: 1–31 (later than the month has = its last day) or -1 for the last day; default the day of Start.nth_weekchoice · none / first / second / third / fourth / last — Monthly / yearly: instead of a day of the month, the first … fourth or last Weekday.weekdaystring — With Nth weekday: Monday … Sunday.monthinteger — Yearly: 1–12; default the month of Start.timestring — Local time of each occurrence (HH:mm).time_zonestring — IANA time zone of the schedule.afterdate & time — List occurrences after this moment; empty for now.startdate — First possible date of the schedule (the anchor for Every N); default the date of After.countinteger — Number of occurrences to return (1–100).exclude_dateslist of strings — Dates (YYYY-MM-DD) to leave out, e.g. holidays.
Outputs
nextdate & time — The next occurrence (UTC instant); empty when none was found.next_localstring — With its offset.occurrenceslist of datetimes — UTC instants, in order.occurrences_locallist of strings — Local date-times with offsets.
Fiscal period fiscal_period
The fiscal year, quarter and period (month) of a date for a fiscal year starting in any month, with the start and end dates of the period, quarter and year and a label such as FY2027 Q2.
Inputs
datedate — The date; empty for today (in Time zone).start_monthinteger — 1 = January … 12 = December, e.g. 7 for July (Australia, NZ public sector), 4 for April (UK, India, Japan, Canada).year_namingchoice · end / start — The calendar year in which the fiscal year ends (FY2027 = July 2026–June 2027) or starts.time_zonestring — For "today" when Date is empty.
Outputs
fiscal_yearintegerquarterinteger — 1–4.periodinteger — Month of the fiscal year, 1–12.labelstring — For example FY2027 Q2.period_labelstring — For example FY2027 P05.period_startdateperiod_enddatequarter_startdatequarter_enddateyear_startdateyear_enddateday_of_yearinteger — 1 on the first day.
Network
None. The action cannot make requests.
Data and files
None. It only sees its inputs.
Secrets
None.
Install
Install it in your workspace
Works on UserTasks cloud and any self-hosted instance. The action lands in Extensibility → Workflow actions, enabled, with its sample workflow.
In the app
- Open Extensibility → Workflow actions → Browse gallery and choose Install on Dates & business calendar. Or download workflow-action-date-business-calendar-1.0.0.utpkg and drag it onto Automations → Packages.
- The wizard verifies the checksum, every file hash and the signature, and shows what it adds.
- In the workflow designer, drag Dates & business calendar from Custom actions, pick a function and fill its inputs. Save & Test shows the typed outputs.
With the CLI
curl -fLO https://usertasks.com/gallery/workflow-action-date-business-calendar-1.0.0.utpkg
usertasks packages install workflow-action-date-business-calendar-1.0.0.utpkg
usertasks activities test ut_dates -f '{"operation":"add_business_days"}'Verify the download
- File SHA-256
- 206af8a9bafad301cb1f7cd44235430faab2c81396781ba882fd39ed1ec7a515
- Package checksum (what is signed)
- sha256:879a4cff578eaa6224a34bf76295c4a406f3097f7a9092fe070d6cb7ec405076
- Module SHA-256
- 99a445fcad96eea94723b1140ccadb368b110fb7f7eed64dedd88e80a488b177
- Signer
- UserTasks Gallery · 49:f3:04:90:47:02:4d:07:28:61:3d:dc:bb:aa:db:11
More workflow actions
All actionsCrypto & IDs
ut_crypto
UUID v4/v7 and ULIDs, SHA hashes, HMAC webhook signatures with a stored secret, base64/hex/URL encoding, random and one-time codes, and HS256 JWTs.
UUID · ULID · Hash · HMAC signature · Encode · Decode · +4 more
10 functions Uses secrets
Data transform
ut_data
Select by JSON path, map, filter, sort, group and aggregate, pivot, de-duplicate and join lists of records, and convert CSV to JSON and back.
Select (JSON path) · Map fields · Filter · Sort · Group & aggregate · Pivot · +5 more
11 functions Pure computation
Math & statistics
ut_math
Safe formulas with variables, exact rounding, statistics and percentiles, compound interest, loan schedules and unit conversion in one workflow step.
Evaluate formula · Round · Statistics · Percentile · Compound interest · Loan schedule · +1 more
7 functions Pure computation