Well, what do you need? No one's likely to give you the whole thing for free ... get a start and someone will certainly be willing to help.
My take: the latest date will always be the highest number. Start with an arbitrary number, loop, and compare .... probably need to substitute in a variable that has been ereg'ed or somesuch.
Or: read all filenames into an array, sort it, and show the last.
The drawbacks: both of 'em seem kinda resource intensive. Maybe some guru has a better plan....