From: Robert Klemme Date: 2007-03-20T02:25:08+09:00 Subject: Re: Sorting Dates and Times in an array On 19.03.2007 18:04, Olivier Renaud wrote: > Instead of comparing arrays that contains one element for the date and another > element for the time, we could have created only one Time object representing > both : > > @date_array.sort_by {|ary| Time.parse("#{ary.first} #{ary.last}") } I think this does not meet the OP's requirements (because of descending date). epoch = Date.new(0) @date_array.sort_by {|dt,tm| [epoch - Date.parse(dt), Time.parse(tm)]} Substraction with epoch will make date components negative and thus lead to descending ordering. Kind regards robert