Add or subtract a date
shift_dateUse for 'what date is N days, weeks, months or years before or after X', including business-day deadlines. Without exclusions, applies days, weeks, months, then years. With exclusions, all units become calendar days, and that many non-excluded days are counted: 1 month after 2027-01-15, excluding Saturday and Sunday, gives 2027-03-01, not 2027-02-15. The start date is not counted; the destination is. To move a plain date such as 'one month later' to a working day instead, set roll to next or previous. If holiday data is unavailable, the call fails. Returns the date, its weekday and ISO week, warnings to read, the rules used and a share link.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"start": "<start>",
"mode": "<mode>"
},
"name": "shift_date"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to move. With an exclusion, only days that are not excluded are counted, and the years, months and weeks are first converted to their calendar-day span from start. | |
| mode | Yes | Direction: add moves forward from start, subtract moves back. | |
| roll | No | next or previous: apply the units as plain calendar arithmetic, then move day by day in that direction to the first day that is not excluded. This needs an exclusion, and not all seven weekdays. none: no such move; with an exclusion, the units are counted in days that are not excluded. | none |
| start | Yes | Date that the move starts from, as year, month and day, for example 2027-01-15. It is not counted. | |
| weeks | No | Weeks to move, 7 days each. | |
| years | No | Calendar years to move. A 29 February that the target year does not have becomes 28 February. | |
| months | No | Calendar months to move. A day that the target month does not have becomes the last day of that month. | |
| region | No | Region of country, to also exclude its regional public holidays: the exact code that list_locations gives for the country. Omit it to use only the national calendar. | |
| country | No | Country whose public holidays excludeHolidays removes, as its code from list_locations, for example US or DE. Necessary when excludeHolidays is true or region is set. | |
| language | No | Language of the Date Calculator page that shareUrl opens. The call fails when that page does not offer the country. nb and no, zh-Hans and zh-cn, and zh-Hant and zh-tw are the same language. Weekday names and warnings in the result are always English. | en |
| excludeHolidays | No | Exclude public holidays, including observed dates, as full days. The data does not mark half-day holidays. Requires country; unavailable holiday data is an error. | |
| excludeWeekdays | No | Weekdays that do not count, as numbers: 0 is Sunday, 1 is Monday, and so on to 6 for Saturday. Use [0,6] for a Saturday and Sunday weekend; some countries have a different weekend, so choose the days for the country. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Always true. An error result has no structured content. | |
| date | Yes | The answer: the date after the move. | |
| rules | Yes | The inputs as the calculation applied them, with defaults filled in, and the rules it followed in words. country is the country that was sent, or null. | |
| isoWeek | Yes | ISO 8601 week of date. | |
| weekday | Yes | English weekday name of date. | |
| shareUrl | Yes | Link that opens this calculation in the Date Calculator on onlinealarmkur.com. With roll, it opens the plain calculation with no roll and no exclusions. | |
| warnings | Yes | English notes that change how to read the result; tell the user about them. Empty when there are none. | |
| holidayData | Yes | Source, version and coverage of the holiday data that the calculation used. Null when it used no holiday data. | |
| rollApplied | Yes | True when roll moved the date away from an excluded day. | |
| businessDaysRan | Yes | True when the move counted only days that are not excluded. False for plain calendar arithmetic, which includes every roll. |