Hi Rails Core,
I was wondering how ActiveRecord is parsing dates, as it seems counterintuitive to how Ruby does it.
RUBYCONSOLE:> Date.parse(“2/2/2”)
=> Sat, 02 Feb 2002
$ rails g model receipt occurred_at:date
RUBYCONSOLE:> Receipt.create!(occurred_at: “2/2/2”)
=> #<Receipt id: 1, occurred_at: “0002-02-02”, created_at: “2014-08-11 17:06:18”, updated_at: “2014-08-11 17:06:18”>
RUBYCONSOLE:> Date.parse(“0002-02-02”)
=> Thu, 02 Feb 0002
``
What’s up here? I’d like my receipt to be on printer paper, not stone tablets.
Thanks!
Josh Bourgeois