mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 09:43:24 -04:00
PT: https://www.pivotaltracker.com/story/show/51457917 Maco found this. The problem was that if you had a blank planting date, and then re-edited the planting, it would say "not yet set" in the form field, then die when it later tried to convert that to a date. I replaced Miles's planted_at_string stuff in the model with a simpler parse_date method in the application helper.
10 lines
269 B
Ruby
10 lines
269 B
Ruby
Time::DATE_FORMATS[:default] = '%B %d, %Y at %H:%M'
|
|
Date::DATE_FORMATS[:default] = "%B %d, %Y"
|
|
|
|
Time::DATE_FORMATS[:date] = "%B %d, %Y"
|
|
Date::DATE_FORMATS[:date] = "%B %d, %Y"
|
|
|
|
Date::DATE_FORMATS[:ymd] = "%Y-%m-%d"
|
|
|
|
Time::DATE_FORMATS[:datetime] = '%B %d, %Y at %H:%M'
|