kplonk
asked on
How to comput the date
I have a date string like this
dd/mm/yyyy
and i need to be able to do computations on it, such as is this date newer than this one
both dates are strings in the above format
how do i do this in perl
dd/mm/yyyy
and i need to be able to do computations on it, such as is this date newer than this one
both dates are strings in the above format
how do i do this in perl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
return $yeara <=> $yearb or $montha <=> $monthb or $daya <=> $dayb;
#or
return (join'',reverse split'/',$a) cmp (join'',reverse split'/',$b);
#or
return (join'',reverse split'/',$a) cmp (join'',reverse split'/',$b);
ASKER
Just th job
1/2/3
3 ranked highest
then 1
then 2