Function
Splits a runtime into hours and minutes, rounded to the nearest minute.
The runtime in seconds
The whole hours and the minutes left over
Rounding happens before the split, so 59 min 45 s reads as 1 h 0 min rather than 0 h 60 min. The parts feed an ICU message, which is what decides how a locale spells them.
1 h 0 min
0 h 60 min
splitRuntime(9525); // { hours: 2, minutes: 39 } Copy
splitRuntime(9525); // { hours: 2, minutes: 39 }
Splits a runtime into hours and minutes, rounded to the nearest minute.