From 09042236645cec437eed747c48085f9b4ef75bcc Mon Sep 17 00:00:00 2001 From: danilo silva Date: Sun, 24 May 2020 21:13:17 +0000 Subject: [PATCH] fix: leading 0 before seconds --- lib/podcast_feed_web/views/feed_view.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/podcast_feed_web/views/feed_view.ex b/lib/podcast_feed_web/views/feed_view.ex index 2a2995d..36b067c 100644 --- a/lib/podcast_feed_web/views/feed_view.ex +++ b/lib/podcast_feed_web/views/feed_view.ex @@ -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