3hrs. 15min. 28sec.
signature textTime([int] t,[bool] z,[bool] m)
t is the time like 11728 and you can assume
z is optional and true means drop zero times, so
3hrs. 0min. 28sec. becomes
m is optional and true means show only up to minutes, so
3hrs. 16min. 48sec. is
For 1 hour,
1hrs. is fine (vs
textTime(11728) returns "3hrs. 0min. 28sec." textTime(11728,true) returns "3hrs. 28sec." textTime(11728,true,true) returns "3hrs."
Regex is fine, speed is inconsequential.
Shortest code wins.