humanize_time v0.0.1 HumanizeTime View Source

Module for converting seconds and milliseconds to human readable timestamps.

Link to this section Summary

Functions

Formatter for converting seconds to a human readable format

Link to this section Types

Link to this type

duration_map()

View Source
duration_map() :: %{
  days: integer(),
  hours: integer(),
  minutes: integer(),
  seconds: integer()
}

Link to this section Functions

Link to this function

format_seconds(seconds)

View Source
format_seconds(integer() | float()) :: String.t()

Formatter for converting seconds to a human readable format

Examples

iex> HumanizeTime.format_seconds(23487)

"6 hr 31 min"