I have a string: \"31-02-2010\" and want to check whether or not it is a valid date. What is the best way to do it?
\"31-02-2010\"
I need a method which which returns
Another way to validate date:
date_hash = Date._parse(date.to_s) Date.valid_date?(date_hash[:year].to_i, date_hash[:mon].to_i, date_hash[:mday].to_i)