On Sun, Nov 1, 2009 at 10:20 AM, Jordi Bunster <jordi / bunster.org> wrote: > On Nov 1, 2009, at 2:33 AM, Jacob Gorban wrote: > >> Oct 30 and most other dates parses fine and ¨Âõî æéîåÔéíåùåáò ïò >> timezone don't matter. > > Using 1.8.6-p383, I can't get valid dates in that format. '17:26:33 Oct 31, > 2009' gives me an exception, much like you, but then: > > ~ $ ruby -v > ruby 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin10.0.0] > > ~ $ ruby -rdate -ryaml -e "puts Date.parse('17:26:33 Oct 30, 2009').to_yaml" > --- 2009-11-30 > > ~ $ ruby -rdate -ryaml -e "puts Date.parse('17:26:33 Dec 30, 2009').to_yaml" > --- 2009-11-30 > > ~ $ ruby -rdate -ryaml -e "puts Date.parse('17:26:33 Feb 30, 2009').to_yaml" > --- 2009-11-30 > > ~ $ ruby -rdate -ryaml -e "puts Date.parse('10:01:02 Jan 30, 2009').to_yaml" > --- 2009-11-30 Not that the month seems to be being ignored in all of these. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale