in reply to Re: Date comparison
in thread Date comparison
- n.b. times are assumed to be *today* unless date is specified. This will handle a variety of different date / time formats.use Date::Parse; my @dates = qw[ 02/03/08 02/04/02 3:00pm 4:00am ]; my @sorted = sort {str2time($a) <=> str2time($b)} @dates; print $_,"\n" for @sorted; __END__ 02/04/02 4:00am 3:00pm 02/03/08
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Date comparison
by dws (Chancellor) on Jul 05, 2002 at 23:07 UTC | |
by George_Sherston (Vicar) on Jul 08, 2002 at 09:48 UTC | |
by dws (Chancellor) on Jul 08, 2002 at 16:49 UTC |