zero.time.format_seconds¶
-
zero.time.
format_seconds
(seconds, format_str='%Hh %Mm %Ss')[source]¶ Format numeric seconds in a human-readable string.
- Parameters
format_str (str) – the format string passed to
time.strftime
- Returns
Filled
format_str
.- Return type
Examples
assert format_seconds(3661) == '01h 01m 01s'