Module | ActiveSupport::CoreExtensions::String::Conversions
In: | vendor/plugins/brazilian-rails/lib/date_portuguese.rb

### Methods

to_date

### Public Instance methods

to_date()

[Source]

       # File vendor/plugins/brazilian-rails/lib/date_portuguese.rb, line 2
    2:   def to_date
    3:     if /(\d{1,2})\W(\d{1,2})\W(\d{4})/ =~ self
    4:       ::Date.new($3.to_i, $2.to_i, $1.to_i)
    5:     else
    6:       ::Date.new(*ParseDate.parsedate(self)[0..2])
    7:     end
    8:   end

[Validate]