fix: leading 0 before seconds
This commit is contained in:
parent
db891109aa
commit
0904223664
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ defmodule PodcastFeedWeb.FeedView do
|
|||
|
||||
def format_length(length) do
|
||||
min = length / 60 |> trunc()
|
||||
sec = length - (min * 60)
|
||||
sec = length - (min * 60) |> Integer.to_string |> String.pad_leading(2, "0")
|
||||
"#{min}:#{sec}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue