Find a date N days before or after
calculate_date_offsetUse this when the user wants the date that is N days or N business days (working days) before or after a date: 'what date is 90 days from today', '30 business days from Nov 3, 2026 in Germany', '10 working days before 2027-01-15', shipping or contract deadlines. Business days skip weekends and the public holidays of the given country and state, including observed weekdays for holidays that fall on a weekend (US July 4, 2027 is a Sunday, so Monday July 5 is skipped); the start date is not counted. For calendar days, roll=next_business_day moves a result that lands on a weekend or holiday to the next business day. Returns the date with its weekday, the holidays skipped, and a calendar (.ics) file. Results are informational: court and filing deadlines may have special rules (court holidays, service days). Does not handle times of day.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | Number of days to add, e.g. 30; use a negative number such as -10 to go back. | |
| roll | No | For calendar days only: if the result is a weekend or holiday, move it, e.g. next_business_day for filing deadlines. Default none. | |
| unit | No | "calendar" counts every day (default); "business" skips weekends and holidays, e.g. business for '10 working days'. | |
| start | Yes | Starting date, e.g. 2026-10-02, "Nov 3, 2026" or "today". | |
| country | No | Country for public holidays as an ISO 3166 two-letter code, e.g. US, GB, DE, PL, AU, CA, IN. Omit to skip holidays (weekends only). | |
| subdivision | No | Optional state/province/region code within the country for local holidays, e.g. TX or CA (US states), BY (Bavaria, DE), ENG or SCT (UK), NSW (AU), ON (CA). | |
| weekend_days | No | Non-working weekdays, e.g. ["friday","saturday"]. Default saturday+sunday (friday+saturday for countries such as SA, IL, EG, QA, KW). | |
| extra_holidays | No | Extra non-working dates to skip, e.g. company shutdown days ["2026-12-24","2026-12-31"]. | |
| include_bank_holidays | No | Also skip bank-only closing days where the data has them (e.g. Dec 24 and Dec 31 in Germany). Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | ||
| kind | Yes | ||
| roll | Yes | ||
| unit | Yes | ||
| notes | Yes | ||
| start | Yes | ||
| inputs | Yes | ||
| region | Yes | ||
| result | Yes | ||
| summary | Yes | ||
| calendar | Yes | ||
| downloads | Yes | ||
| rolled_from | Yes | ||
| weekend_days | Yes | ||
| holiday_source | Yes | ||
| holidays_skipped | Yes | ||
| holidays_in_range | Yes | ||
| weekend_days_skipped | Yes | ||
| calendar_days_spanned | Yes | ||
| result_is_business_day | Yes |