Add or subtract time from a date
Add or subtract years, months, weeks, days, business days or hours to a date or date-time, with month-end and daylight-saving rules spelled out.
- Version 1
- Free, no sign-up
Result: Month-end clamping
| Result The resulting date or date-time. |
2026-02-28 |
|---|---|
| Weekday Day of the week of the result. |
Saturday |
Calculator date/add@1.
How it is calculated
months first (clamped to month end), then weeks and days, then elapsed timeCalendar amounts (years, months, weeks, days) move the date on the calendar, keeping the clock time; hours, minutes and seconds are then added as elapsed time. So adding 1 day across a daylight saving change keeps 09:00 at 09:00, while adding 24 hours may not. Month additions that land on a day that does not exist use the month's last day, and the response says so.
- Dates use the Gregorian calendar (ISO 8601). Adding months clamps to the month's last day (Jan 31 + 1 month = Feb 28 or 29).
- Time zones come from the IANA time zone database in the pinned tzdata package; the version used is returned with each date-time result.
- Business days skip the weekend days and holidays; the start day is not counted.
References
Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.
Use it from your code
curl https://api.curatedapi.com/v1/calc/date/add \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"start": "2026-01-31",
"months": 1
}'
The same call in Python
import os
import requests
payload = {
"start": "2026-01-31",
"months": 1,
}
response = requests.post(
"https://api.curatedapi.com/v1/calc/date/add",
headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
json=payload,
timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
"start": "2026-01-31",
"months": 1,
};
const response = await fetch("https://api.curatedapi.com/v1/calc/date/add", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log((await response.json()).result);
MCP tool calc_date_add at https://mcp.curatedapi.com.
Inputs, outputs and errors in the API reference.
Put it on your website
<div data-curatedapi-widget="date/add" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>
Use a public key registered for your site. Calculations are billed like API calls. How widgets work.
Related calculators
- Age calculator
- Date difference calculator
- Public holidays by country and year
- Time zone converter
- Working days calculator with public holidays
- Working hours and SLA deadline calculator
Add this calculator to your website
Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.
Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.