summary refs log tree commit diff
path: root/port/ddate/ddate.1
blob: c340578f90e7ea570221c53e8a1c8179806e711b (plain) (blame)
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
116
117
.\" 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
Cardinal number of day in season (i.e., 23)
.IP %e
Ordinal 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 %Y
The year of our Lady Discord (i.e., 3182)
.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.
There is not that much distinct stuff here anymore. 2022-07-03Add The Bone Shard EmperorJune McEnroe Suffers a little bit from middle book but I really enjoyed it. Read it faster than the first one too, despite its length. 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe Mixed bag like most collections of short stories. Some of them are pretty good. The author of the worst written story also has the worst written bio. 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe