Follow Along as I Stumble on the Path to Learning RoR

Accepting American Date Format

I needed code to allow users to enter dates in American format MM/DD/YYYY, and for it to save correctly in my database.  Previously, I was using American Date Monkey Patch code (http://stackoverflow.com/questions/6825048/how-to-make-assigning-an-american-formatted-date-string-into-a-date-variable-wor), but I started having issues with it.

So I moved to this gem by Jeremy Evans that does the same, The Ruby American Date Gem:

https://github.com/jeremyevans/ruby-american_date 

Advertisements

Comments are closed.