I have a $DateXpander identifier that would display your months and years accurately based on number of days in the month and handles leap years as well. The output format can be adjusted through it as well. Up to you if you'd like to take a look at it.

* For these example, 32480239 is $calc($ctime - $ctime(%richloe))

Input: //echo -a $datexpander(32480239)
Output: 1 year, 1 week, 3 days, 22 hours, 17 minutes, and 19 seconds

As you can see, that auto-hides anything that is 0. You can force the display like this:

Input: //echo -a $datexpander(32480239,ymwdhns)
Output: 1 year, 0 months, 1 week, 3 days, 22 hours, 17 minutes, and 19 seconds

Various formats can be easily handled, such as only displaying the total number of days:

Input: //echo -a $datexpander(32480239,d)
Output: 375 days

Or changing the output format:

Input: //echo -a $datexpander(32480239,03d04h05n06s)
Output: 375 days, 22 hours, 17 minutes, and 19 seconds

Just as some examples of what it can do.


Invision Support
#Invision on irc.irchighway.net