Skip to content

Instantly share code, notes, and snippets.

@josevalim
Created February 2, 2020 13:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josevalim/dd78e6c5c050927b3e4674744de04393 to your computer and use it in GitHub Desktop.
Save josevalim/dd78e6c5c050927b3e4674744de04393 to your computer and use it in GitHub Desktop.
defmodule TimeFormat do
def format(seconds) do
~T[00:00:00] |> Time.add(seconds) |> Calendar.strftime("%X")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment