Hello,
I had the same problem and came up with following piece of code.
Perhaps this a helper for anybody. Feel free to comment on it, I'm not
sure if I made it as fast and simple as possible.
class Date
class << self
def _parse_with_finnish_format(date, now = Time.now)
if (match_data = date.strip.match(/^(\d{1,2})\.(\d{1,2})\.
(\d{4})$/))
{:mday => match_data[1].to_i,
:mon => match_data[2].to_i,
:year => match_data[3].to_i}
else
_parse_without_finnish_format(date, now)
end
end
alias_method_chain :_parse, :finnish_format
end
end
Thanks for the nice plugin, by the way.
Cheers,
Gregor
On Nov 23, 5:39 pm, "Tim Harper" <
timchar...@gmail.com> wrote:
> It looks like ruby does not support that format natively. You'll need to
> alias chain on Date::_parse to intercept a finish string and translate it.
>
> tim
>