[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] Sort quickie
On Sat, 19 Jun 2004 00:14:02 -0500, Jay Hannah <jay@jays.net> wrote:
>
> I had a bunch of hash keys that were dates in MMDDYYYY format. I wanted
> to get a sorted list of the keys. Perl to the rescue! Have y'all
> configured custom sort subroutines before? They're cool...
[snip]
Concerning parsing dates . .. I just discovered a nifty module in CPAN
called Date::Manip that will parse anything -- just dangle anything
that resembles a date around it, and it will figure it out.
>From perldoc Date::Manip:
$date = ParseDate("today");
$date = ParseDate("1st thursday in June 1992");
$date = ParseDate("05/10/93");
$date = ParseDate("12:30 Dec 12th 1880");
$date = ParseDate("8:00pm december tenth");
--
Mike Hostetler
thehaas@binary.net
http://www.binary.net/thehaas