On May 30, 8:48 am, Colin Law <clan...@googlemail.com> wrote:
> 2009/5/28 Claus-christian Ude <rails-mailing-l...@andreas-s.net>
>
>
>
> > Hi,
>
> > it's seems to me the function Time.parse has an error:
>
> > ok - Time.parse("12/01/2008") => 2008-12-01
> > Error - Time.parse("01.12.2008") => 2008-01-12
>
> My brain does not seem to be working well today, I cannot actually see what
> you are getting at. What would you expect the second one to give and why?
>
These things are ofter locale dependant. My european brain expects day
month year, but apparently in the US month ,day, year is more common.
If you are expecting dates in a particular format strptime is useful,
if not some sort of calendary widget is often a better idea.
Fred
> Colin
>
>
>
> > Or is there an option/timezone I have to chnage, so it will work
> > correctly?
>
> > Greetings Claus-Christian Ude
> > --
> > Posted viahttp://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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---