-
Notifications
You must be signed in to change notification settings - Fork 1
/
hodie.1
138 lines (131 loc) · 4.16 KB
/
hodie.1
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
.\"Process this file with
.\"groff -man -Tascii hodie.1
.\"
.TH HODIE 1 "AUGUST 2000" Linux "User Manuals"
.SH NAME
hodie \- Print current date and time... in Latin
.SH SYNOPSIS
.BR "hodie " "["
.I "OPTION"
]...
.SH DESCRIPTION
.B hodie
prints out the current date using classic Latin, and in
addition also prints it out and time using Roman numerals.
.SH OPTIONS
.IP "-h, --help"
Print short help message with syntax
.IP "-v, --verbose"
Print months and days (pridie, Kalends, Nones, Ides) full and not the
respective abbreviations (standard mode of operation)
.IR "Two occurrences of " "-v" " as well as the use of " "-vv"
.IR " or " "--extremely-verbose "
will include the numerals where applicable fully declined, as in
.RB "'ante diem " quintum " Kalends Septembres'."
.IP "-n, --numerals"
Don't print anything in Latin \- only the date and time as Roman numerals.
.IP "-x, --force-numerals"
Print both the verbose latin and the date and time as Roman numerals.
.IP "-c, --classic, --auc"
Print the year in the classic manner
.I "ab urbe condita"
instead of the more modern
.I "anno domini".
.IP "-a, --ante-diem"
Print the date expressing the number of days to the next main day with
the
.I "ante diem"
expression instead of ablative case.
.IP "-d, --date"
Print out any date. This has a rather special syntax, with a keyword
following the
.I -d
flag choosing input format. See section on
.I DATE INPUT
below.
.IP "-r, --republican OFFSET"
Print out the date dated
.I ab urbe tua condita
with the offset counted in years as compared to the modern european
kalendar (originating with the hypothetical birth of christ).
.BI "hodie " "-r -753"
would be equivalent with
.BI "hodie " "-c"
.
.IP "--version"
Print out the version number of this release and exit. No matter
whether other options appear on the command line or not.
.SH DATE INPUT
Following the
.I -d
or the
.I --date
option flags, the first item
.B must
be one of the following:
.IP verbose
In this case, the year, month and day are given by following the
.I verbose
keyword by the flags
.I -y, --year, -m, --month, -d, --day
for year, month and date respectively
.IP ymd
After this flag, the date comes in the format
.I YYYY-MM-DD
, where the numbers may
be separated by any non-numeric character.
.IP dmy
With this flag, the date is given as
.I DD-MM-YYYY
.IP mdy
With this flag, the date is given as
.I MM-DD-YYYY
.
Restrictions on the characters that may replace the hyphen apply as above.
.SH HISTORY
The story began on the 10. of August, 2000 (a.d. VI Id. Iul.,
MM). Having finished most of my assignment for my two-month summer job
at Ericsson Eurolab Deutschland, Nuremberg, I was idling around on the
Internet, and stumbled over the dotcomma-challenges
.I <http://www.dotcomma.org>
, where especially the Roman numeral challenge started my mind.
Almost an hour hacking, and there it was, another hour, and the
.I "language support"
was there. Before the night was over, I had written this man page and
had the layout of a decent
.B Makefile
drawn out mentally.
At the end of the next day, I was so far that I actually had the
workings of
.I RPM
worked out, constructed a .rpm-package and a .src.rpm-package, which was
promptly released on my home-page, announced on freshmeat and uploaded
to metalab (apps/misc :-).
Response was quick and plentiful. By now, I have compilation reports
from Linux, FreeBSD and SCO Unixware 7; there are a few compability
issues to put aside, but it works surprisingly well.
.SH RETURN VALUES
.B hodie
returns zero. Always. If it doesn't, then something is
.B really
bad with the code.
For some really unreadable code, this means that
.B hodie
could be used as a strange replacement for
.B true
.
.SH BUGS
It doesn't sanity check the input... telling
.B hodie
to display the roman form of the 99th of march gives a slightly
jumbled output, which most definitely does not make sense.
Reports are more than welcome (e-mail below).
.SH AUTHOR
Now, who would come up with such a thing?
Well, I'm Mikael Johansson, a rather all-round geek from Stockholm. I'm
gravely interested in languages, in computers and in mathematics; a
combination more dangerous than you might think.
E-mails to
.I <[email protected]>
.SH SEE ALSO
.BR date (1)