Kirk Haines wrote: > On Wednesday 10 August 2005 10:58 am, Chris Roos wrote: > >>Hi, >> >>I've just spent a short while creating a couple of methods that take a >>string representing a date (in the format dd-mmm-yyyy, e.g. 10-Aug-2005) >>and return an actual date object. > > > irb(main):001:0> require 'date' > => true > irb(main):002:0> d = Date.parse('10-Aug-2005') > => #<Date: 4907185/2,0,2299161> > > > Kirk Haines > > > Just as I thought, two different ways to achieve in a max of two lines what I had spent time coding up manually. Thanks for your help guys. Chris