lib/brdata/date_portuguese.rb in brdata-2.1.8 vs lib/brdata/date_portuguese.rb in brdata-2.1.9
- old
+ new
@@ -5,11 +5,11 @@
# "27/09/2007".to_date
def to_date
if /(\d{1,2})\W(\d{1,2})\W(\d{4})/ =~ self
::Date.new($3.to_i, $2.to_i, $1.to_i)
else
- ::Date.new(*ParseDate.parsedate(self)[0..2])
+ ::Date.new(*::Date._parse(self, false).values_at(:year, :mon, :mday))
end
end
end
class Date
@@ -42,6 +42,6 @@
class NilClass
def to_s_br
""
end
-end
\ No newline at end of file
+end