blob: 6928f959163b6986be5cfadc072ceb3bce683cfa [file] [log] [blame]
.\" All Rites Reversed. This file is in the PUBLIC DOMAIN.
.\" Kallisti.
.TH DDATE 1 "59 Bureaucracy 3161" "" "Emperor Norton Utilities"
ddate \- converts Gregorian dates to Discordian dates
.B ddate
.RI [ \fB+\fPformat]
.RI [ date ]
.B ddate
prints the date in Discordian date format.
If called with no arguments,
.B ddate
will get the current system date, convert this to the Discordian
date format and print this on the standard output. Alternatively, a
Gregorian date may be specified on the command line, in the form of a numerical
day, month and year.
If a format string is specified, the Discordian date will be printed in
a format specified by the string. This mechanism works similarly to the
format string mechanism of
.B date(1),
only almost completely differently. The fields are:
.IP %A
Full name of the day of the week (i.e., Sweetmorn)
.IP %a
Abbreviated name of the day of the week (i.e., SM)
.IP %B
Full name of the season (i.e., Chaos)
.IP %b
Abbreviated name of the season (i.e., Chs)
.IP %d
Ordinal number of day in season (i.e., 23)
.IP %e
Cardinal number of day in season (i.e., 23rd)
.IP %H
Name of current Holyday, if any
.IP %N
Magic code to prevent rest of format from being printed unless today is
a Holyday.
.IP %n
.IP %t
.IP %X
Number of days remaining until X-Day. (Not valid if the SubGenius options
are not compiled in.)
.IP %{
.IP %}
Used to enclose the part of the string which is to be replaced with the
words "St. Tib's Day" if the current day is St. Tib's Day.
.IP %\.
Try it and see.
% ddate
Sweetmorn, Bureaucracy 42, 3161 YOLD
% ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H'
Today is Sweetmorn, the 42nd of Bureaucracy, 3161.
% ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995
It's Prickle-Prickle, the 50th of Bureaucracy, 3161.
Celebrate Bureflux
% ddate +"Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996
Today's St. Tib's Day, 3162.
.B ddate(1)
will produce undefined behaviour if asked to produce the date for St. Tib's
day and its format string does not contain the St. Tib's Day delimiters
%{ and %}.
After `X-Day' passed without incident, the Church of the SubGenius
declared that it had got the year upside down - X-Day is actually in 8661 AD
rather than 1998 AD. Thus, the True X-Day is Cfn 40, 9827.
Original program by Druel the Chaotic aka Jeremy Johnson (
Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (
Five tons of flax.
Public domain. All rites reversed.
Malaclypse the Younger,
.I "Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her"
The ddate command is part of the util-linux-ng package and is available from