================================================================== Snippet-title: ddate v1.1 Creator: Graham Keellings E-mail: pivot@keellings.com Website: http://www.keellings.com/software/pivot.php Creation date: 3rd March 2008, (Setting Orange, the 70th of Chaos in the YOLD 3174) Singapore ================================================================== Content of zipped file: ----------------------- snippet_ddate.php readme_ddate.txt (this file) Usage: ------ 1) unpack this package in your extensions/snippets/ folder. 2) place a [[ddate]] tag, with the appropriate parameters, in any of your template files, whereever you want the ddate to appear (side bar, page top or bottom, etc) 3) rebuild the FrontPage(s). Description: ------------ * The snippet returns the Discordian Date (http://en.wikipedia.org/wiki/Discordian_Date) * for a given date, or for today. * Parameters: ----------- * @param int day - day: 1..31; if blank, today's date is used * and the month and year parameters are ignored. * @param int month - month: 1..12 * @param int year - year: positive * @param int outputFormat - if 0 (default) output is plain text; if 1, * then output is a URL the text of the ddate, * linking to the wikipedia explanation of * discordian dates. * History: * * v 1.1 2008/03/11 Singapore * (Setting Orange, the 70th of Chaos in the YOLD 3174) * Removed mcal_ function to calculate leap eyar and replaced it with * inline code from * http://www.codewalkers.com/c/a/Miscellaneous-Code/PHP-Date-Validation-including-leap-year/ * mcal_ library must be enabled in order to be used (it wasn't for me) * and seems not to be supported on Windows. * * v 1.0 2005/07/15 Hvalstad, Norway * (Boomtime, the 51st day of Confusion in the YOLD 3171 * initial version