pub fn format_duration(total_seconds: u32) -> StringExpand description
Creates string representation as bytes, compatible with Erlang’s :erlang.integer_to_binary/1 Format a duration into human-readable form following the requirements:
- seconds if less than a minute
- minutes plus seconds if less than hour
- hours and minutes if less than day
- days and hours if less than month
- months and days if less than year
- years, months and days if bigger than year