Ok, I have the solution. Here I correct the wrong function of 
Date.parse:

class Date
  class << self
    alias :oldparse :_parse

    def _parse(str, comp=false)
      if str =~ /(\d{1,2})\.(\d{1,2})\.(\d\d\d\d)\ (\d{1,2})\:(\d\d)/
        e       = Format::Bag.new
        e.mday  = $1.to_i
        e.mon   = $2.to_i
        e.year  = $3.to_i
        e.hour  = $4.to_i
        e.min   = $5.to_i
        return e.to_hash
      end
      if str =~ /(\d{1,2})\.(\d{1,2})\.(\d\d\d\d)/
        e       = Format::Bag.new
        e.mday  = $1.to_i
        e.mon   = $2.to_i
        e.year  = $3.to_i
        return e.to_hash
      end

      oldparse(str, comp)
    end
  end
end
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to