TIME CALCULATOR
Calculate time differences, add/subtract durations, analyze time intervals, and sort timestamps using date arithmetic operations.
Instructions
Perform time arithmetic operations including duration calculations, date math, interval operations, statistical analysis, and sorting. Use for adding/subtracting time periods, calculating differences between dates, analyzing time-based datasets, or sorting arrays of timestamps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Type of calculation to perform | |
| interaction_mode | No | How base_time and compare_time arrays interact. 'auto_detect' handles single-to-single, single-to-many, many-to-single automatically. Defaults to 'auto_detect' | |
| base_time | No | Base ISO datetime(s). Single string or array. Defaults to current time if not provided | |
| compare_time | No | Compare ISO datetime(s) for diff/duration_between operations. Single string or array | |
| timezone | No | Timezone for base_time (e.g., 'America/New_York') | |
| compare_time_timezone | No | Timezone for compare_time. If not provided, base_time timezone is used | |
| years | No | Years to add/subtract | |
| months | No | Months to add/subtract | |
| days | No | Days to add/subtract | |
| hours | No | Hours to add/subtract | |
| minutes | No | Minutes to add/subtract | |
| seconds | No | Seconds to add/subtract |