Method: String#to_time
- Defined in:
- lib/brdata/time_portuguese.rb
#to_time ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/brdata/time_portuguese.rb', line 8 def to_time if /^(0?[1-9]|[12]\d|3[01])\W(0?[1-9]|1[012])\W(\d{4})(\W([01]?\d|2[0123])\W([0-5]?\d)\W?([0-5]\d)?)?$/ =~ self ::Time.mktime($3.to_i, $2.to_i, $1.to_i, $5.to_i, $6.to_i, $7.to_i) else _original_to_time end end |