Add to a date
date_addAdd or subtract years, months, weeks, days, business days, hours, minutes, or seconds from a date to calculate due dates, deadlines, delivery estimates, and expiry dates.
Instructions
Add or subtract years/months/weeks/days/business days/hours/minutes/seconds from a date. Month-end clamping; business days skip weekends, given holidays, and the public holidays of an optional country. Use for due dates, deadlines, delivery estimates, expiry and "N working days from today". First 25 calls per day are free, then $0.001 per call (x402).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | YYYY-MM-DD, or ISO 8601 datetime with Z or offset | |
| days | No | ||
| hours | No | ||
| weeks | No | ||
| years | No | ||
| months | No | ||
| country | No | ISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days | |
| minutes | No | ||
| seconds | No | ||
| holidays | No | Extra dates excluded from business-day counts (rest days from workdays are always excluded) | |
| workdays | No | Working days of the week, 0 = Sunday. Default [1,2,3,4,5] (Mon–Fri); e.g. [0,1,2,3,4] for Sun–Thu or [1,2,3,4,5,6] for Mon–Sat | |
| business_days | No | Applied after calendar units; skips rest days (see workdays) and holidays |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| result | Yes | YYYY-MM-DD, or ISO datetime (UTC) for datetime input | |
| weekday | Yes | ||
| is_business_day | Yes |