Home : General : Perl Programming :

General: Perl Programming: Re: [Paul] Need help sorting by date.: Edit Log

Here is the list of edits for this post
Re: [Paul] Need help sorting by date.
I'm not sure I understand what you mean... I think what I need is a date to unix function like what Links has. I was able to make Links sort by date using that function because it converts the dd-mmm-yyyy format to unix time. It seems like I could change this:

foreach $rp (sort { chr($a->{$sort_on} + 97) cmp chr($b->{$sort_on} + 97) } values %record){



foreach $rp (sort { &date_to_unix($a->{$sort_on}) <=> &date_to_unix($b->{$sort_on}) } values %record){

As long as I had a "date_to_unix" function that converts mm/dd/yyyy to unix time, it seems like that would work. The date to unix function in Links converts dd-mmm-yyyy. Can anyone help with this?

Last edited by:

Ryan: Feb 18, 2003, 10:02 AM

Edit Log: