Add and subtract time three ways: combine two day/hour/minute/second values, apply a span to a starting date and time, or evaluate a free-form time expression. Every result is normalized to days, hours, minutes, and seconds (and shown in total hours, minutes, and seconds).
Formula
All modes convert each value to seconds, apply the operations, then normalize back:
total seconds = days×86,400 + hours×3,600 + minutes×60 + seconds
days = ⌊total ÷ 86,400⌋ hours = ⌊remainder ÷ 3,600⌋
minutes = ⌊remainder ÷ 60⌋ seconds = remainder
For a date, the start date and time of day become seconds since a reference day; adding the span and converting back gives the new date and clock time.
Time units
| Unit | Seconds |
|---|---|
| 1 minute | 60 |
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
Examples
Add two times
2 days 5 hours 30 minutes plus 1 day 20 hours 45 minutes equals 4 days, 2 hours, 15 minutes (353,700 seconds).
Evaluate an expression
"1d 2h 3m 4s + 4h 5s - 2030s + 28h" totals 206,959 seconds, which is 2 days, 9 hours, 29 minutes, 19 seconds.
Add time to a date
Starting at 12:00:00 on June 17, 2026 and adding 30 hours gives 18:00:00 on Thursday, June 18, 2026.