Ruby on Rails: the best way to compare two dates?
Date.parse('2010-11-01') < Date.today
will return true if '2010-11-01' has already passed
You can also use past?
Date.parse("2012-11-01").past?
Date.parse('2010-11-01') < Date.today
will return true if '2010-11-01' has already passed
You can also use past?
Date.parse("2012-11-01").past?