open-pod/lib/podcast_feed_web/views/feed_view.ex
2020-05-24 21:01:58 +00:00

9 lines
190 B
Elixir

defmodule PodcastFeedWeb.FeedView do
use PodcastFeedWeb, :view
def format_length(length) do
min = length / 60 |> trunc()
sec = length - (min * 60)
"#{min}:#{sec}"
end
end