Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Sorting Dates Issueby johngg (Canon) |
on Aug 18, 2010 at 17:37 UTC ( [id://855865]=note: print w/replies, xml ) | Need Help?? |
Your idea of extracting year, month and day then concatenating them so they sort naturally is fine. You could take it a little further and apply a Guttman Rosler Transform instead of a sort routine. This node has an explanation and this is the paper on the technique. I think split might be an easier way of extracting date elements than a regex.
I hope this is of interest. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|