add_to_date
Move a date by years, months, days and ticks. They are applied in that fixed order, which matters: a month then a day is not always the same landing as a day then a month. Adding days is always exact. policy decides what happens when the day does not exist in the target month: 'clamp' (default) moves to that month's last day, 'reject' refuses with an error, 'spill' carries the excess into the following month. Adding months to an intercalary date is refused, because those days sit between months; add days instead. 'ticks' moves within the day for a calendar that divides its day, carrying whole days as they fall. USE 'steps' FOR MORE THAN ONE MOVE: each step gives its own years, months, days and ticks, and its own date or the shared one, so a base date and a list of offsets is a single call rather than one per offset. Only the date is shared: a step states its own move in full, so a step naming no months moves by no months whatever the call around it says. Answers up to 1000 in one call, in the order given, as {count, ok, results}. Prefer this over one call per item: the spec travels once instead of once each.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| days | No | ||
| time | No | ||
| steps | No | ||
| ticks | No | ||
| years | No | ||
| months | No | ||
| policy | No | clamp | |
| calendar | Yes | ||
| on_error | No | fail |