1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
.\" All Rites Reversed. This file is in the PUBLIC DOMAIN.
.\" Kallisti.
.TH DDATE 1 "Bureaucracy 3161" "ddate" "Emperor Norton User Command"
.SH NAME
ddate \- convert Gregorian dates to Discordian dates
.SH SYNOPSIS
.B ddate
.RI [ \fB+\fPformat]
.RI [ date ]
.SH DESCRIPTION
.B ddate
prints the date in Discordian date format.
.PP
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.
.PP
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
Newline
.IP %t
Tab
.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.
.bp
.SH EXAMPLES
.nf
% ddate
.br
Sweetmorn, Bureaucracy 42, 3161 YOLD
.PP
% ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H'
.br
Today is Sweetmorn, the 42nd of Bureaucracy, 3161.
.PP
% ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995
.br
It's Prickle-Prickle, the 50th of Bureaucracy, 3161.
.br
Celebrate Bureflux
.PP
% ddate +"Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996
.br
Today's St. Tib's Day, 3162.
.br
.SH BUGS
.B ddate(1)
will produce undefined behavior 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 %}.
.SH NOTE
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.
.SH AUTHOR
.nh
Original program by Druel the Chaotic aka Jeremy Johnson (mpython@gnu.ai.mit.edu)
.br
Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (acb@dev.null.org)
.br
Gregorian B.C.E. dates fixed by Chaplain Nyan the Wiser, aka Dan Dart (ntw@dandart.co.uk)
.br
Five tons of flax.
.SH DISTRIBUTION POLICY
Public domain. All rites reversed.
.SH SEE ALSO
date(1),
.br
http://www.subgenius.com/
.br
Malaclypse the Younger,
.I "Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her"
.SH AVAILABILITY
The ddate command is available from https://github.com/bo0ts/ddate.
|