1 .\" Copyright (c) 1989, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93
43 .Op Fl f Ar calendarfile
48 .Op . Ar mm Op . Ar year
53 .Op Fl U Ar UTC-offset
58 utility checks the current directory for a file named
60 and displays lines that begin with either today's date
62 On the day before a weekend (normally Friday), events for the next
63 three days are displayed.
65 The following options are available:
68 Print lines from today and the next
70 days (forward, future).
72 Process the ``calendar'' files of all users and mail the results
74 This requires super-user privileges.
76 Print lines from today and the previous
78 days (backward, past).
80 Specify which day of the week is ``Friday'' (the day before the
83 .It Fl f Pa calendarfile
86 as the default calendar file.
90 .Op . Ar mm Op . Ar year
93 For test purposes only: set date directly to argument values.
94 .It Fl l Ar longitude , Fl U Ar UTC-offset
96 Perform lunar and solar calculations from this longitude or from
98 If neither is specified, the calculations will be based on the
99 difference between UTC time and localtime.
101 Print lines from today and the next
103 days (forward, future).
104 Ignore weekends when calculating the number of days.
108 To handle calendars in your national code table you can specify
109 .Dq LANG=<locale_name>
110 in the calendar file as early as possible.
112 To handle the local name of sequences, you can specify them as:
113 .Dq SEQUENCE=<first> <second> <third> <fourth> <fifth> <last>
114 in the calendar file as early as possible.
116 The names of the following special days are recognized:
117 .Bl -tag -width 123456789012345 -compact
127 The solar equinox in March.
129 The solar solstice in June.
131 The solar equinox in March.
133 The solar solstice in December.
135 The first day of the Chinese year.
137 These names may be reassigned to their local names via an assignment
140 in the calendar file.
142 Other lines should begin with a month and day.
143 They may be entered in almost any format, either numeric or as character
145 If the proper locale is set, national month and weekday
147 A single asterisk (``*'') matches every month.
148 A day without a month matches that day of every week.
149 A month without a day matches the first of that month.
150 Two numbers default to the month followed by the day.
151 Lines with leading tabs default to the last entered date, allowing
152 multiple line specifications for a single date.
154 The names of the recognized special days may be followed by a
155 positive or negative integer, like:
160 Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for
161 last, first, second, third, fourth) for moving events like
162 ``the last Monday in April''.
164 By convention, dates followed by an asterisk are not fixed, i.e., change
167 Day descriptions start after the first <tab> character in the line;
168 if the line does not contain a <tab> character, it is not displayed.
169 If the first character in the line is a <tab> character, it is treated as
170 a continuation of the previous line.
172 The ``calendar'' file is preprocessed by
174 allowing the inclusion of shared files such as lists of company holidays or
176 If the shared file is not referenced by a full pathname,
178 searches in the current (or home) directory first, and then in the
180 .Pa /usr/share/calendar .
181 Empty lines and lines protected by the C commenting syntax
185 Some possible calendar entries (<tab> characters highlighted by
187 .Bd -unfilled -offset indent
191 #include <calendar.usholiday>
192 #include <calendar.birthday>
194 6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day).
195 Jun. 15\fB\et\fRJune 15.
196 15 June\fB\et\fRJune 15.
197 Thursday\fB\et\fREvery Thursday.
198 June\fB\et\fREvery June 1st.
199 15 *\fB\et\fR15th of every month.
200 2010/4/15\fB\et\fR15 April 2010
202 May Sun+2\fB\et\fRsecond Sunday in May (Muttertag)
203 04/SunLast\fB\et\fRlast Sunday in April,
204 \fB\et\fRsummer time in Europe
205 Easter\fB\et\fREaster
206 Ostern-2\fB\et\fRGood Friday (2 days before Easter)
207 Paskha\fB\et\fROrthodox Easter
211 .Bl -tag -width calendar.christian -compact
213 file in current directory
217 A chdir is done into this directory if it exists.
218 .It Pa ~/.calendar/calendar
219 calendar file to use if no calendar file exists in the current directory.
220 .It Pa ~/.calendar/nomail
221 do not send mail if this file exists.
224 The following default calendar files are provided in
225 .Pa /usr/share/calendars:
227 .Bl -tag -width calendar.southafrica -compact
229 File which includes all the default files.
230 .It Pa calendar.australia
231 Calendar of events in Australia.
232 .It Pa calendar.birthday
233 Births and deaths of famous (and not-so-famous) people.
234 .It Pa calendar.christian
236 This calendar should be updated yearly by the local system administrator
237 so that roving holidays are set correctly for the current year.
238 .It Pa calendar.computer
239 Days of special significance to computer people.
240 .It Pa calendar.croatian
241 Calendar of events in Croatia.
242 .It Pa calendar.dutch
243 Calendar of events in the Netherlands.
244 .It Pa calendar.freebsd
248 .It Pa calendar.french
249 Calendar of events in France.
250 .It Pa calendar.german
251 Calendar of events in Germany.
252 .It Pa calendar.history
253 Everything else, mostly U.S.\& historical events.
254 .It Pa calendar.holiday
255 Other holidays, including the not-well-known, obscure, and
258 .It Pa calendar.judaic
260 The entries for this calendar have been obtained from the port
262 .It Pa calendar.music
263 Musical events, births, and deaths.
264 Strongly oriented toward rock 'n' roll.
265 .It Pa calendar.newzealand
266 Calendar of events in New Zealand.
267 .It Pa calendar.russian
269 .It Pa calendar.southafrica
270 Calendar of events in South Africa.
271 .It Pa calendar.usholiday
273 This calendar should be updated yearly by the local system administrator
274 so that roving holidays are set correctly for the current year.
275 .It Pa calendar.world
276 Includes all calendar files except for national files.
281 program previously selected lines which had the correct date anywhere
283 This is no longer true, the date is only recognized when it occurs
284 at the beginning of a line.
296 Chinese New Year is calculated at 120 degrees east of Greenwich,
297 which roughly corresponds with the east coast of China.
298 For people west of China, this might result that the start of Chinese
299 New Year and the day of the related new moon might differ.
301 The phases of the moon and the longitude of the sun are calculated
302 against the local position which corresponds with 30 degrees times
303 the time-difference towards Greenwich.
305 The new and full moons are happening on the day indicated: They
306 might happen in the time period in the early night or in the late
308 It doesn't indicate that they are starting in the night on that date.
310 Because of minor differences between the output of the formulas
311 used and other sources on the Internet, Druids and Werewolves should
312 double-check the start and end time of solar and lunar events.
316 utility does not handle Jewish holidays.
318 There is no possibility to properly specify the local position
319 needed for solar and lunar calculations.