Our current display of the date/time that a comment is written uses truncate which is from Elixir 1.6. As heroku uses v.1.5 we need to change this so that it is compatible.
Initial solution:
def format_date(date) do
date
|> NaiveDateTime.to_iso8601
|> tidyISODate
end
def tidyISODate(iso_date) do
iso_date
|> String.replace("T", " ")
|> String.split(".")
|> List.first
end
Our current display of the date/time that a comment is written uses
truncate
which is from Elixir 1.6. As heroku uses v.1.5 we need to change this so that it is compatible.Initial solution: