shift_datetime
Add or subtract years, months, weeks, days, hours, minutes, or seconds from a date-time, defaulting to now; use negative values to calculate past dates.
Instructions
Add or subtract an amount of time to a date-time (default: now). Use negative numbers for the past. Years, months, weeks and days keep the wall time; if the day does not exist in the new month, the last day of that month is used (2024-01-31 + 1 month = 2024-02-29). Hours, minutes and seconds are elapsed time. Accepted forms: '2024-12-10', '2024-12-10 14:30', '2024-12-10T14:30:00+09:00', '2024/12/10', '2024年12月10日 14時30分', Japanese era such as '令和6年12月10日' or 'R6.12.10', and a time only such as '14:30' (today).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Start date-time. Omit to start from now. | |
| days | No | ||
| hours | No | ||
| weeks | No | ||
| years | No | ||
| format | No | Output format name or custom pattern, as in get_datetime. | datetime |
| months | No | ||
| minutes | No | ||
| seconds | No | ||
| timezone | No | IANA timezone of 'base' and of the result. Omit for local time. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |