There is a script already written that handles years and months as well as the default weeks, days, hours, minutes, and seconds.
I can't recall exactly where I saw it right now, but I will search and post if I'm able to find it.
Found it. Written by Riamus, the code for DateXpander can be downloaded from
here