# How to format time durations for media clips {audio, video, music, science etc}

Mathematica has powerful date, time and timeseries functions and options. Yet they all seem to be tightly tied to Time in global clock-calendar-astronomic perception.

I need to do basic time-duration arithmetic and plotting for media clips..

For example: I have sequence of video clips:

v01 = 25m14s
v02 = 2h23m00s
v03 = 1h

v01and02 = v01 + v02
videostotalTime = v01 + v02 +v03


etc

help: I cannot find simple syntax for this in Mathematica

How to format and add/subtract/multiply my data in SIMPLEST most legible manner to give me totals, sub-totals, duration offsets, lists etc?

I tried

v01 = TimeObject[{0,25,14}]
v02 = TimeObject[{2,23,00}]
v01 + v02 is what I want <<< but does not give me duration sum.


I have been looking in docs and googling, but am missing basic keywords/concept

thank you

• here is how red-lang does it red-by-example.org/#timexex – nomadics Jul 21 '17 at 14:10
• Try Quantity[MixedMagnitude[{25, 14}], MixedUnit[{"Minutes", "Seconds"}]] – Kuba Jul 21 '17 at 14:25
• Can you just use Quantity? I.e. v01 = Quantity[25, "Minutes"] + Quantity[14, "Seconds"] – KraZug Jul 21 '17 at 14:25
• thanks^ ... I really want a much more concise syntax :: easier to read and write, not just for me, but for interop workflow chain others <p> – nomadics Jul 27 '17 at 13:39
• ..and for other people {who are unfamiliar with mathematica}. I spent a few days digging into red-lang [v nice but new-- see red-by-example.org/#timexex]. Then dug into emacs orgmode which is mature and does all the math right -- and inside tables. stackoverflow.com/questions/17679867/… orgmode.org/manual/Durations-and-time-values.html >> model orgmode, then hope to emulate in Mathematica – nomadics Jul 27 '17 at 13:55