date_math
Perform timezone-aware date arithmetic: add or subtract durations with DST-safe days, or calculate differences between datetimes in different zones.
Instructions
Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours and minutes are absolute), or compute the difference between two datetimes that may be in different zones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datetime | Yes | Base datetime: ISO 8601 or natural language. | |
| timezone | Yes | IANA timezone the base datetime is in. | |
| operation | Yes | What to compute: { type:'add', amount, unit } to add/subtract a duration, or { type:'diff', to_datetime, to_timezone? } for the difference between two datetimes. |