User:Kniblet Beast/Sandbox/Datediff

Usage
A utility template that compares two dates and returns the difference in days or years.

Parameters

 * 1st Parameter : Required . This is the initial date used in the comparison. This is almost always the older date when two dates are being provided.
 * Format: yyyymmdd (i.e. 20100701) or d mmm yyyy (i.e. 1 Jul 2010).


 * 2nd Parameter : Optional. This is the end date used in the comparison. The default is the user's local date if no date is provided.
 * Format: yyyymmdd (i.e. 20100701) or d mmm yyyy (i.e. 1 Jul 2010).


 * 3rd Parameter : Optional. Indicates whether the value returned should be in days or years. The default is days if no value is provided.
 * Values: d / D for days, or y / Y for years.

Examples

 *  =
 *  =
 *  =
 *  =