instance method
to_date
Ruby on Rails 3.1.12
Since v3.0.20Signature
to_date()
No documentation comment.
Source
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 43
def to_date
return nil if self.blank?
::Date.new(*::Date._parse(self, false).values_at(:year, :mon, :mday))
end
Defined in activesupport/lib/active_support/core_ext/string/conversions.rb line 43
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String