Ddate Block
Component ID
2909331
Component name
Ddate Block
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
310
Component created
Component changed
Component body
What is Ddate Block?
Dddate block provides configurable blocks displaying a Discordian date.
Configuration

You can configure the module through the Block administration interface. The three options allow you to control the block content.
- Format allows to specify the outputted date string (see below for details)
- Date allows to specify a Gregorian date, e.g. 29022012 for 29th of February 2012. If this field is left blank today's date is used.
- Maximum Cache Lifetime In order for the block to show the current date caches must be cleared every now and then. If this field is left blank, the maximum cache lifetime for the block content is 15 Minutes. To specify a different lifetime input the number of seconds you want to allow the content to be cached.
Format Options
If a format string is specified, the Discordian date will be returned in a format specified by the string. This mechanism works similarly to the format string mechanism of date(), only almost completely differently.
Available format string fields:
- %A Full name of the day of the week (e.g. Sweetmorn)
- %a Abbreviated name of the day of the week (e.g. SM)
- %B Full name of the season (e.g. Chaos)
- %b Abbreviated name of the season (e.g. Chs)
- %d Ordinal number of the day in the season (e.g. 23)
- %e Cardinal number of the day in the season (e.g. 23rd)
- %Y A full numeric representation of a year, 4 digits
- %H Name of current Holyday, if any
- %N Magic code to prevent rest of the format being printed unless today is a Holyday
- %n Newline
- %t Tab
- %X Number of days remaining until X-Day.
- %{ Enclose the part of the string which is to be replaced with "St. Tib's Day" if the current day is St. Tib's Day (start delimiter)
- %} Enclose the part of the string which is to be replaced with "St. Tib's Day" if the current day is St. Tib's Day (end delimiter)
Hodgepodge
The Discordian Calendar is defined on page 00034 of the Principia Discordia (see: Principia Discordia and Wikipedia for more details). The implementation uses EmperorNortonCommands/lib/Ddate for the calculation and displaying of the date (see: Packagist).
Hail Eris!
