]> git.ipfire.org Git - thirdparty/util-linux.git/blame - misc-utils/ddate.1
rename util-linux-ng back to util-linux
[thirdparty/util-linux.git] / misc-utils / ddate.1
CommitLineData
726f69e2
KZ
1.\" All Rites Reversed. This file is in the PUBLIC DOMAIN.
2.\" Kallisti.
3.TH DDATE 1 "59 Bureaucracy 3161" "" "Emperor Norton Utilities"
4.SH NAME
5ddate \- converts Gregorian dates to Discordian dates
6.SH SYNOPSIS
1fb6af91
PB
7.B ddate
8.RI [ \fB+\fPformat]
9.RI [ date ]
726f69e2
KZ
10.SH DESCRIPTION
11.B ddate
12prints the date in Discordian date format.
13.PP
14If called with no arguments,
1fb6af91 15.B ddate
726f69e2
KZ
16will get the current system date, convert this to the Discordian
17date format and print this on the standard output. Alternatively, a
18Gregorian date may be specified on the command line, in the form of a numerical
19day, month and year.
20.PP
1fb6af91
PB
21If a format string is specified, the Discordian date will be printed in
22a format specified by the string. This mechanism works similarly to the
726f69e2 23format string mechanism of
1fb6af91 24.B date(1),
726f69e2
KZ
25only almost completely differently. The fields are:
26.IP %A
27Full name of the day of the week (i.e., Sweetmorn)
1fb6af91 28.IP %a
726f69e2 29Abbreviated name of the day of the week (i.e., SM)
1fb6af91 30.IP %B
726f69e2
KZ
31Full name of the season (i.e., Chaos)
32.IP %b
33Abbreviated name of the season (i.e., Chs)
34.IP %d
35Ordinal number of day in season (i.e., 23)
36.IP %e
37Cardinal number of day in season (i.e., 23rd)
38.IP %H
a8e7dd2a 39Name of current Holyday, if any
726f69e2
KZ
40.IP %N
41Magic code to prevent rest of format from being printed unless today is
a8e7dd2a 42a Holyday.
1fb6af91 43.IP %n
726f69e2 44Newline
1fb6af91 45.IP %t
726f69e2
KZ
46Tab
47.IP %X
5c36a0eb
KZ
48Number of days remaining until X-Day. (Not valid if the SubGenius options
49are not compiled in.)
726f69e2
KZ
50.IP %{
51.IP %}
52Used to enclose the part of the string which is to be replaced with the
53words "St. Tib's Day" if the current day is St. Tib's Day.
54.IP %\.
55Try it and see.
56.bp
57.SH EXAMPLES
58.nf
59% ddate
60.br
61Sweetmorn, Bureaucracy 42, 3161 YOLD
62.PP
63% ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H'
64.br
1fb6af91 65Today is Sweetmorn, the 42nd of Bureaucracy, 3161.
726f69e2
KZ
66.PP
67% ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995
68.br
1fb6af91 69It's Prickle-Prickle, the 50th of Bureaucracy, 3161.
726f69e2
KZ
70.br
71Celebrate Bureflux
72.PP
5213517f 73% ddate +"Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996
726f69e2 74.br
1fb6af91 75Today's St. Tib's Day, 3162.
726f69e2
KZ
76.br
77
78.SH BUGS
79
80.B ddate(1)
e0c2b50a 81will produce undefined behavior if asked to produce the date for St. Tib's
1fb6af91 82day and its format string does not contain the St. Tib's Day delimiters
726f69e2
KZ
83%{ and %}.
84
5c36a0eb
KZ
85.SH NOTE
86
87After `X-Day' passed without incident, the Church of the SubGenius
88declared that it had got the year upside down - X-Day is actually in 8661 AD
89rather than 1998 AD. Thus, the True X-Day is Cfn 40, 9827.
90
726f69e2
KZ
91.SH AUTHOR
92.nh
93Original program by Druel the Chaotic aka Jeremy Johnson (mpython@gnu.ai.mit.edu)
94.br
95Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (acb@dev.null.org)
96.br
97Five tons of flax.
98
99.SH DISTRIBUTION POLICY
100
101Public domain. All rites reversed.
102
103.SH SEE ALSO
104
105date(1),
106.br
5c36a0eb
KZ
107http://www.subgenius.com/
108.br
1fb6af91 109Malaclypse the Younger,
726f69e2
KZ
110.I "Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her"
111
86d62711 112.SH AVAILABILITY
601d12fb
KZ
113The ddate command is part of the util-linux package and is available from
114ftp://ftp.kernel.org/pub/linux/utils/util-linux/.