Format date to iso with dedicated method
This commit is contained in:
parent
39293a7be6
commit
539fc682a0
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Champ < ActiveRecord::Base
|
||||||
|
|
||||||
def format_date_to_iso
|
def format_date_to_iso
|
||||||
date = begin
|
date = begin
|
||||||
Date.parse(value).strftime("%F")
|
Date.parse(value).iso8601
|
||||||
rescue
|
rescue
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue