time_time_duration
Calculate, add, subtract, multiply, or divide time durations in HH:MM:SS or total seconds. Compute the difference between two clock times, including midnight-crossing spans.
Instructions
Time Duration Calculator. Pure clock-time/duration arithmetic on time spans expressed as hours/minutes/seconds (HH:MM:SS or total seconds) — no wall-clock, calendar, or "now" dependency. operation "compute" normalizes one duration; "add" sums 2-100 durations; "subtract" returns a-b (negative allowed); "multiply" scales a duration by a numeric factor; "divide" divides by a non-zero numeric divisor; "between" returns end-start for two clock times (hour 0-23, minute 0-59, second 0-<60), adding 24h when crossesMidnight is set and end<=start. This is HH:MM:SS clock-time math; use time_date_difference for calendar years/months/days and business-day counts, time_age_calculator for age/birthday spans, and convert_timestamp for Unix-epoch to human-date conversion. Runs locally via the same JS the page uses: read-only, deterministic, offline-capable, rate-limited (60 req/min anonymous), no auth. Result is wrapped as operation plus a data object (totalSeconds, hhmmss, hms, iso8601, signed component breakdown).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | "compute": normalize one duration (hours/minutes/seconds). "add": sum items. "subtract": a-b. "multiply": duration*factor. "divide": duration/divisor. "between": end-start of two clock times. | |
| hours | No | Hours component for compute/multiply/divide (used when duration object is omitted). Defaults to 0; may be fractional or negative. | |
| minutes | No | Minutes component for compute/multiply/divide (used when duration object is omitted). Defaults to 0. | |
| seconds | No | Seconds component for compute/multiply/divide (used when duration object is omitted). Defaults to 0; may be fractional. | |
| duration | No | Duration operand for multiply/divide; if omitted the top-level hours/minutes/seconds are used instead. | |
| items | No | Durations to sum. Required when operation is add; 2-100 entries. | |
| a | No | Minuend duration. Required when operation is subtract. | |
| b | No | Subtrahend duration. Required when operation is subtract. | |
| factor | No | Finite multiplier. Required when operation is multiply; may be negative or fractional. | |
| divisor | No | Finite non-zero divisor. Required when operation is divide; must not be 0. | |
| start | No | Start clock time. Required when operation is between. | |
| end | No | End clock time. Required when operation is between. | |
| crossesMidnight | No | For between only: when true and end<=start, add 24h to end so the span wraps past midnight. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | The operation that was run, echoed back. | |
| data | No | Normalized duration result. |