It\'s commonplace even outside of software to communicate time or date intervals in a truncated manner. For example: 1h10m translates to \"One hour and ten minu
You can use moment: http://momentjs.com/docs/#/durations/
moment.duration(100); // 100 milliseconds
moment.duration(60000).humanize(); // a minute
Read more in the above linked docs. And to get all unit values you may want to use the ISO8601 Format:
moment.duration(1, 'd').toISOString() // "P1D"
For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds". Read more directly under http://momentjs.com/docs/#/durations/as-iso-string/