version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
DDATE |
|
|
2 |
!!!DDATE |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
EXAMPLES |
|
|
7 |
BUGS |
|
|
8 |
NOTE |
|
|
9 |
AUTHOR |
|
|
10 |
DISTRIBUTION POLICY |
|
|
11 |
SEE ALSO |
|
|
12 |
---- |
|
|
13 |
!!NAME |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
ddate - converts Gregorian dates to Discordian dates |
|
|
17 |
!!SYNOPSIS |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__ddate [[+format] [[date]__ |
|
|
21 |
!!DESCRIPTION |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
__ddate__ prints the date in Discordian date |
|
|
25 |
format. |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
If called with no arguments, __ddate__ will get the |
|
|
29 |
current system date, convert this to the Discordian date |
|
|
30 |
format and print this on the standard output. Alternatively, |
|
|
31 |
a Gregorian date may be specified on the command line, in |
|
|
32 |
the form of a numerical day, month and year. |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
If a format string is specified, the Discordian date will be |
|
|
36 |
printed in a format specified by the string. This mechanism |
|
|
37 |
works similarly to the format string mechanism of |
|
|
38 |
__date(1),__ only almost completely differently. The |
|
|
39 |
fields are: |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
%A |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
Full name of the day of the week (i.e., |
|
|
46 |
Sweetmorn) |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
%a |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
Abbreviated name of the day of the week (i.e., |
|
|
53 |
SM) |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
%B |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
Full name of the season (i.e., Chaos) |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
%b |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
Abbreviated name of the season (i.e., Chs) |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
%d |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
Ordinal number of day in season (i.e., 23) |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
%e |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
Cardinal number of day in season (i.e., 23rd) |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
%H |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
Name of current Holyday, if any |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
%N |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
Magic code to prevent rest of format from being printed |
|
|
90 |
unless today is a Holyday. |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
%n |
|
|
94 |
|
|
|
95 |
|
|
|
96 |
Newline |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
%t |
|
|
100 |
|
|
|
101 |
|
|
|
102 |
Tab |
|
|
103 |
|
|
|
104 |
|
|
|
105 |
%X |
|
|
106 |
|
|
|
107 |
|
|
|
108 |
Number of days remaining until X-Day. (Not valid if the |
2 |
perry |
109 |
!SubGenius options are not compiled in.) |
1 |
perry |
110 |
|
|
|
111 |
|
|
|
112 |
%{ |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
%} |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
Used to enclose the part of the string which is to be |
|
|
119 |
replaced with the words |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
%. |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
Try it and see. |
|
|
126 |
!!EXAMPLES |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
% ddate |
|
|
130 |
Sweetmorn, Bureaucracy 42, 3161 YOLD |
|
|
131 |
% ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H' |
|
|
132 |
Today is Sweetmorn, the 42nd of Bureaucracy, 3161. |
|
|
133 |
% ddate + |
|
|
134 |
!!BUGS |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
__ddate(1)__ will produce undefined behaviour if asked to |
|
|
138 |
produce the date for St. Tib's day and its format string |
|
|
139 |
does not contain the St. Tib's Day delimiters %{ and |
|
|
140 |
%}. |
|
|
141 |
!!NOTE |
|
|
142 |
|
|
|
143 |
|
|
|
144 |
After `X-Day' passed without incident, the Church of the |
2 |
perry |
145 |
!SubGenius declared that it had got the year upside down - |
1 |
perry |
146 |
X-Day is actually in 8661 AD rather than 1998 AD. Thus, the |
|
|
147 |
True X-Day is Cfn 40, 9827. |
|
|
148 |
!!AUTHOR |
|
|
149 |
|
|
|
150 |
|
|
|
151 |
Original program by Druel the Chaotic aka Jeremy Johnson |
|
|
152 |
(mpython@gnu.ai.mit.edu) |
|
|
153 |
Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak |
|
|
154 |
(acb@dev.null.org) |
|
|
155 |
Five tons of flax. |
|
|
156 |
!!DISTRIBUTION POLICY |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
Public domain. All rites reversed. |
|
|
160 |
!!SEE ALSO |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
date(1), |
|
|
164 |
http://www.subgenius.com/ |
|
|
165 |
Malaclypse the Younger, ''Principia Discordia, Or How I |
|
|
166 |
Found Goddess And What I Did To Her When I Found |
|
|
167 |
Her'' |
|
|
168 |
---- |