Richard: It's funny/scary how similar your posted code and the stuff I penciled last night are. Biggest difference is that I use a single call to TimeDiff('today', $FileDate. 'd') instead of 2 calls to SerialDate. 
Roberm:
It's not a good idea to remove the header from UDFs. The comments don't hurt anything and will identify how to use the code (and prevent the temptation to modify it.)
I'd also go back and review Richard's code very carefully and insert LOTS of comments so you know exactly what each line or section of code is doing. This will help when you come back in 6 months to change something, or you get promoted and your replacement has to figure it out.
Some of my larger scripts (16,000+ lines) are 55% comments by weight (char count).
There's a UDF called Sanity that will examine your code and point out common errors, such as missing or mismatched parens, quotes, etc. The KixDev package on my web site provides a KGen script that automatically runs Sanity on your script files. Very helpful for finding those common yet hard to find errors.
FYI - one thing that I have successfully done to deal with multi-national time formats is dynamically change the time display format to YYYY/MM/DD and perform all my calculations based on that format. When the script ends, it restores the previous format. It is a user setting, so won't affect anything else on the system.
Glenn
_________________________
Actually I
am a Rocket Scientist!