Add or subtract time from a date
add_to_dateAdd or subtract years, months, weeks and days to or from a calendar date and get the resulting date with its weekday, ISO week and day of the year. Use it for 'what is the date 90 days from today?', contract end dates, probation periods and anniversaries. Years and months move by the calendar first (Jan 31 plus one month is the last day of February), then weeks and days. Use add_business_days to skip weekends and holidays and days_between_dates to measure the gap between two dates. Valid for years 2000 to 2100.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to move, 0 to 37,000. Default 0. | |
| weeks | No | Weeks to move, 0 to 5,300. Default 0. | |
| years | No | Years to move, 0 to 100. Default 0. | |
| months | No | Months to move, 0 to 1,200. Default 0. | |
| direction | No | add to move forward, subtract to move back. Default add. | add |
| start_date | Yes | The date to start from as a calendar date in the form YYYY-MM-DD, for example 2026-11-02. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes | The inputs as used, with defaults filled in. | |
| results | Yes | The computed numbers. Unavailable numbers are null. | |
| summary | Yes | One or two plain sentences with the headline numbers. | |
| calculator_url | Yes | The TeamPredict calculator page that shows the same calculation, where a person can change the inputs. |