Date.parse should be a little more strict with weekday parsing from string #7882

garysweaver opened this Issue Oct 9, 2012 · 3 comments


None yet
2 participants

garysweaver commented Oct 9, 2012

Rails 3.2.8 console:
1.9.3p194 :001 > Date.parse("Monitoring")
=> Mon, 08 Oct 2012

That looks nothing like a date, but it is pulling Monday from Monitoring. Should Date.parse be that lenient?

This is a standard Ruby library and not part of Rails. Check out Date.parse for more details :)


garysweaver commented Oct 10, 2012

Thanks. Rails does a require 'date' so that's why it is showing up in rails c and not in irb unless do a require 'date'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment