Format date to iso with dedicated method

This commit is contained in:
Mathieu Magnin 2017-08-01 16:40:43 +02:00
parent 39293a7be6
commit 539fc682a0

View file

@ -58,7 +58,7 @@ class Champ < ActiveRecord::Base
def format_date_to_iso
date = begin
Date.parse(value).strftime("%F")
Date.parse(value).iso8601
rescue
nil
end