Date and time functions in PHP are very flexible, but I still have to find a PHP function that converts my date strings to the Discordian Calendar:
The Discordian calendar divides the year into five seasons (commonly known as Chaos (la kalsa), Discord (la tolsarxe), Confusion (la cfipu), Bureaucracy (la lujycatni) and the Aftermath (la jalge) ) of 73 days each. Every four years, an extra day (St. Tib's Day / la tib noi vrude) is inserted between Chaos 59 and Chaos 60.
The Discordian calendar defines a week as having five days, named Sweetmorn(la titcer), Boomtime (la bumtem), Pungenday (la pynjdei/cpinydei), Prickle-Prickle (la kilkil) and Setting Orange (after the Five Elements). Chaos 1 is always Sweetmorn, Chaos 2 Boomtime, The Aftermath 73 Setting Orange(la canci narju), etc. St. Tib's Day is none of the five days of the week.
The Discordian calendar's year 0 (notionally the time of the Original Snub) is known in the Gregorian calendar as 1166 BC; alternatively, the Gregorian year 0 (notionally the birth of the Jewish mystic Yeshua ben Yosef) is known as 1166 YOLD in the Discordian calendar. The year known in the Gregorian calendar as 2001 is known as 3167 in the Discordian calendar.
Just in case you wanted to know.
How do we output a date string in the Discordian Calendar? If you want to write your own PHP ddate function, you might find the code of the Perl Date::Discordian module useful. If the settings in your php.ini allow the execution of system commands (either safe_mode is off, or safe_mode is on and safe_mode_exec_dir contains the directory that holds the ddate executable, see safe mode settings) and you are running off a Linux box, then you can use the output of ddate to construct a discordian date in mainfile.php:
$datetime = explode("Today is", exec('ddate'));
This will result in something like
Setting Orange, the 41st day of Bureaucracy in the YOLD 3169
as the value of $datetime displayed in the News posts. More on this confusing topic in Principia Discordia, the Opiatum Magnum of the Discordian Philosophy, as well as in the Discordian Forum - where Enlightenment meets Confusion (TM)...