addZonedBusinessDays
Signature
Section titled “Signature”addZonedBusinessDays(value: string, amount: number): stringReturn a zoned ISO 8601 datetime string with amount business days added to value.
- Uses fixed ISO Monday–Friday business days (no locale awareness).
- Has no calendar parameter, so no other weekend and no holidays. It is not the zoned form of the plain
addBusinessDays, which takes aBusinessCalendar. - Saturday and Sunday are skipped during the count.
- Preserves the original time component through the operation.
- Returns "" on invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | ISO 8601 zoned datetime string |
amount | number | number of business days to add |
Returns
Section titled “Returns”Zoned ISO 8601 datetime string after adding business days, or "" on invalid input
Examples
Section titled “Examples”import { addZonedBusinessDays } from "@northguild/gmt/zoned/calculate";
addZonedBusinessDays("2024-03-15T14:30:00-04:00[America/New_York]", 1) // "2024-03-18T14:30:00-04:00[America/New_York]"