Skip to content

subtractZonedBusinessDays

subtractZonedBusinessDays(value: string, amount: number): string

Return a zoned ISO 8601 datetime string with amount business days subtracted from 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 subtractBusinessDays, which takes a BusinessCalendar.
  • Saturday and Sunday are skipped during the count.
  • Preserves the original time component through the operation.
  • Returns "" on invalid input.
ParameterTypeDescription
valuestringISO 8601 zoned datetime string
amountnumbernumber of business days to subtract

Zoned ISO 8601 datetime string after subtracting business days, or "" on invalid input

import { subtractZonedBusinessDays } from "@northguild/gmt/zoned/calculate";
subtractZonedBusinessDays("2024-03-18T14:30:00-04:00[America/New_York]", 1) // "2024-03-15T14:30:00-04:00[America/New_York]"
output 

zoned/calculate/subtractZonedBusinessDays.ts