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