humanize_time v1.0.0 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, opts \\ [])

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

Formatter for converting seconds to a human readable format

Examples

iex> HumanizeTime.format_seconds(23487)
"6 hr 31 min"