---
id: TST-PFM-INT-002
title: business days
kind: unit
product_area: platform
module: integrations
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: macroservice-libraries
files:
  - packages/workflow-actions/src/business-days.spec.ts
implements:
  - ATS-PFM-INT-019-06
  - ATS-PFM-INT-022-03
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: Pure test fixtures owned by the test process.
evidence:
  - 'macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts'
test_cases:
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#P2D business from a
      Friday 16:00 with a Monday holiday lands on Wednesday 16:00, across the DST change (08 §10 case 8)
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#skips the weekend: P1D
      business from Friday 16:00 is Monday 16:00 when Monday works
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#counts from a weekend
      start to the next working day: P1D from Saturday 10:00 is Tuesday 10:00 past the holiday
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#a week of business days
      is five working days
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#PT4H business from 15:00
      on a 09:00–17:00 calendar is 11:00 the next working day
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#PT4H business from
      before opening starts counting at opening: 07:00 → 13:00
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#business hours on a
      whole-day calendar run through the night and skip the weekend: Friday 22:00 + PT4H is Monday 02:00
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#P1DT2H business is a
      working day, then two working hours
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#refuses years or months
      as business time, and business time without a calendar
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#refuses a calendar with
      no working day rather than looping
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#the calendar is read in
      its own zone, not the tenant’s
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#parses an ISO 8601
      duration into its parts, and refuses anything else
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#a calendar day keeps the
      wall clock across the change; twenty-four calendar hours do not
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#subtracting is the
      mirror: a day back across the change keeps the wall clock, a month back clamps to its end
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#an anchor is an instant
      as given, or a local date at the start of that day (or a time) in the zone
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#a deadline at a local
      date-time, at a dated field plus a duration, and at the end of the next month
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#the package reads no
      native Date: the time package’s guard finds nothing in its sources
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#an elapsed timer is
      measured from its anchor on its calendar
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#an empty anchor leaves
      the timer unscheduled, and so does one the host did not supply
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#preserve_elapsed
      measures from earlier by the previous run’s active time
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#an SLA target is
      measured like an elapsed timer
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#the next occurrence of a
      repeating timer is `every` after the one that fired, in calendar days unless it says business
    provenance: test
  - source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#a timer without repeat
      has no next occurrence
    provenance: test
dependency_evidence:
  provenance: test
  source: 'macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts'
  reviewed:
    - Suite introduction
    - Fixture setup
    - Client substitutions
    - Assertions and cleanup
---
# business days

## Verification Boundary

This unit suite exercises business days. Its registration records the executable definition; no run result is asserted.

## What This Suite Proves

The bindings identify the detailed outcomes asserted by this suite. Test-level evidence retains the individual checks, including cases where several suites contribute to one scenario.

## What It Does Not Prove

Pure cases do not establish database constraints, deployed authorization or provider effects.

## Real Dependencies and Test Doubles

The suite evaluates its imported functions with controlled inputs. Its source records the fixture and substitution boundary.

## Must Not Be Doubled

The function under test and its result checks must execute. Replacing them with expected answers provides no proof.
