Middle Class White Guy
Contact me
Wine SLuRP Gadgets Poetry Stuff Galleries About Me

Date Processing Functions

Dates are an arse. They conform to no kind of logic that a computer can easily understand. Even something that should be simple, like adding 60 days to today's date can be a real trial. Add to that the tendency of people to write dates in any of a variety of formats, and it can all become a total pain.

So, I wrote this gadget. It will take almost any user-entered date and convert it to ANSI-standard format (YYYY-MM-DD). It generates a handy array containing the number of days in each month, and will calculate the number of days in February for any given year (not accounting for pre-Gregorian years). Finally, given a date in ANSI format, it will return it in user friendly format. The format is specified in exactly the same way as the PHP function date()

This version does date addition (e.g. 20th January + 3 weeks = 10th February), but not date subtraction (e.g. 10th February - 20th January = 3 weeks). I had a version that did that too, but it is lost to antiquity. I'll re-create it at some point, and when I do I will upload it here. In the meantime, the current version can be downloaded here.

Enter a date :
Enter a format (see date()) :
Perform date addition:
ANSII formatted :
Specified format :

All gadgets are released under the terms of the GNU GPL.
Creative Commons License
Except where stated, this site and its contents are copyright ©2021 Alec Harkness and licensed under a Creative Commons Attribution-Share Alike 2.5 License.
Contact me