humanise
gleam add humanise
import gleam/io
import humanise
import humanise/time
pub fn main() {
humanise.bytes_int(10_000) |> io.println // 10.0KB
time.Seconds(0.5) |> time.humanise |> time.to_string |> io.println // 500.0ms
time.Hours(1.0) |> time.to_minutes |> io.debug // 60.0
}
Further documentation can be found at https://hexdocs.pm/humanise.
Development
gleam run # Run the project
gleam test # Run the tests