hi, overhere users go nuts if they have to enter the date in iso format,
so i have to make my applications in such a way that not only dates are
displayed in the “dd-mm-yyy” format but also can be entered in that way.
somewhere i found this code to put in the environment script:
Hi Remco, you can replace parsedate method so it would allow european
format, for example:
require (‘parsedate’)
module ParseDate
class << self
alias_method :old_parsedate, :parsedate unless
method_defined?(:old_parsedate)
end
def self.parsedate(str)
match = /(\d{1,2}).(\d{1,2}).(\d{2,4}).?/.match(str)
return ParseDate.old_parsedate(str) unless match
[match[3].to_i, match[2].to_i, match[1].to_i, nil, nil, nil, nil,
nil]
end
end