]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/calendar/calendar.1
Update to tcsh 6.18.01.
[FreeBSD/FreeBSD.git] / usr.bin / calendar / calendar.1
1 .\" Copyright (c) 1989, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
15 .\"
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
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)calendar.1  8.1 (Berkeley) 6/29/93
29 .\" $FreeBSD$
30 .\"
31 .Dd June 13, 2002
32 .Dt CALENDAR 1
33 .Os
34 .Sh NAME
35 .Nm calendar
36 .Nd reminder service
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl A Ar num
40 .Op Fl a
41 .Op Fl B Ar num
42 .Op Fl D Ar moon|sun
43 .Op Fl d
44 .Op Fl F Ar friday
45 .Op Fl f Ar calendarfile
46 .Op Fl l Ar longitude
47 .Oo
48 .Bk -words
49 .Fl t Ar dd Ns
50 .Sm off
51 .Op . Ar mm Op . Ar year
52 .Sm on
53 .Ek
54 .Oc
55 .Op Fl U Ar UTC-offset
56 .Op Fl W Ar num
57 .Sh DESCRIPTION
58 The
59 .Nm
60 utility checks the current directory for a file named
61 .Pa calendar
62 and displays lines that fall into the specified date range.
63 On the day before a weekend (normally Friday), events for the next
64 three days are displayed.
65 .Pp
66 The following options are available:
67 .Bl -tag -width Ds
68 .It Fl A Ar num
69 Print lines from today and the next
70 .Ar num
71 days (forward, future).
72 .It Fl a
73 Process the ``calendar'' files of all users and mail the results
74 to them.
75 This requires super-user privileges.
76 .It Fl B Ar num
77 Print lines from today and the previous
78 .Ar num
79 days (backward, past).
80 .It Fl D Ar moon|sun
81 Print UTC offset, longitude and moon or sun information.
82 .It Fl d
83 Debug option: print current date information.
84 .It Fl F Ar friday
85 Specify which day of the week is ``Friday'' (the day before the
86 weekend begins).
87 Default is 5.
88 .It Fl f Pa calendarfile
89 Use
90 .Pa calendarfile
91 as the default calendar file.
92 .It Fl l Ar longitude
93 Perform lunar and solar calculations from this longitude.
94 If neither longitude nor UTC offset is specified, the calculations will 
95 be based on the difference between UTC time and localtime.
96 If both are specified, UTC offset overrides longitude.
97 .It Xo Fl t
98 .Sm off
99 .Ar dd
100 .Op . Ar mm Op . Ar year
101 .Sm on
102 .Xc
103 For test purposes only: set date directly to argument values.
104 .It Fl U Ar UTC-offset
105 Perform lunar and solar calculations from this UTC offset.
106 If neither UTC offset nor longitude is specified, the calculations
107 will be based on the difference between UTC time and localtime.
108 If both are specified, UTC offset overrides longitude. 
109 .It Fl W Ar num
110 Print lines from today and the next
111 .Ar num
112 days (forward, future).
113 Ignore weekends when calculating the number of days.
114 .El
115 .Sh FILE FORMAT
116 .Pp
117 To handle calendars in your national code table you can specify
118 .Dq LANG=<locale_name>
119 in the calendar file as early as possible.
120 .Pp
121 To handle the local name of sequences, you can specify them as:
122 .Dq SEQUENCE=<first> <second> <third> <fourth> <fifth> <last>
123 in the calendar file as early as possible.
124 .Pp
125 The names of the following special days are recognized:
126 .Bl -tag -width 123456789012345 -compact
127 .It Easter
128 Catholic Easter.
129 .It Paskha
130 Orthodox Easter.
131 .It NewMoon
132 The lunar New Moon.
133 .It FullMoon
134 The lunar Full Moon.
135 .It MarEquinox
136 The solar equinox in March.
137 .It JunSolstice
138 The solar solstice in June.
139 .It SepEquinox
140 The solar equinox in September.
141 .It DecSolstice
142 The solar solstice in December.
143 .It ChineseNewYear
144 The first day of the Chinese year.
145 .El
146 These names may be reassigned to their local names via an assignment
147 like
148 .Dq Easter=Pasen
149 in the calendar file.
150 .Pp
151 Other lines should begin with a month and day.
152 They may be entered in almost any format, either numeric or as character
153 strings.
154 If the proper locale is set, national month and weekday
155 names can be used.
156 A single asterisk (``*'') matches every month.
157 A day without a month matches that day of every week.
158 A month without a day matches the first of that month.
159 Two numbers default to the month followed by the day.
160 Lines with leading tabs default to the last entered date, allowing
161 multiple line specifications for a single date.
162 .Pp
163 The names of the recognized special days may be followed by a
164 positive or negative integer, like:
165 .Dq Easter+3
166 or
167 .Dq Paskha-4 .
168 .Pp
169 Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for
170 last, first, second, third, fourth) for moving events like
171 ``the last Monday in April''.
172 .Pp
173 By convention, dates followed by an asterisk are not fixed, i.e., change
174 from year to year.
175 .Pp
176 Day descriptions start after the first <tab> character in the line;
177 if the line does not contain a <tab> character, it is not displayed.
178 If the first character in the line is a <tab> character, it is treated as
179 a continuation of the previous line.
180 .Pp
181 The ``calendar'' file is preprocessed by
182 .Xr cpp 1 ,
183 allowing the inclusion of shared files such as lists of company holidays or
184 meetings.
185 If the shared file is not referenced by a full pathname,
186 .Xr cpp 1
187 searches in the current (or home) directory first, and then in the
188 directory
189 .Pa /usr/share/calendar .
190 Empty lines and lines protected by the C commenting syntax
191 .Pq Li /* ... */
192 are ignored.
193 .Pp
194 Some possible calendar entries (<tab> characters highlighted by
195 \fB\et\fR sequence)
196 .Bd -unfilled -offset indent
197 LANG=C
198 Easter=Ostern
199
200 #include <calendar.usholiday>
201 #include <calendar.birthday>
202
203 6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day).
204 Jun. 15\fB\et\fRJune 15.
205 15 June\fB\et\fRJune 15.
206 Thursday\fB\et\fREvery Thursday.
207 June\fB\et\fREvery June 1st.
208 15 *\fB\et\fR15th of every month.
209 2010/4/15\fB\et\fR15 April 2010
210
211 May Sun+2\fB\et\fRsecond Sunday in May (Muttertag)
212 04/SunLast\fB\et\fRlast Sunday in April,
213 \fB\et\fRsummer time in Europe
214 Easter\fB\et\fREaster
215 Ostern-2\fB\et\fRGood Friday (2 days before Easter)
216 Paskha\fB\et\fROrthodox Easter
217
218 .Ed
219 .Sh FILES
220 .Bl -tag -width calendar.christian -compact
221 .It Pa calendar
222 file in current directory
223 .It Pa ~/.calendar
224 .Pa calendar
225 HOME directory.
226 A chdir is done into this directory if it exists.
227 .It Pa ~/.calendar/calendar
228 calendar file to use if no calendar file exists in the current directory.
229 .It Pa ~/.calendar/nomail
230 do not send mail if this file exists.
231 .El
232 .Pp
233 The following default calendar files are provided in
234 .Pa /usr/share/calendars:
235 .Pp
236 .Bl -tag -width calendar.southafrica -compact
237 .It Pa calendar.all
238 File which includes all the default files.
239 .It Pa calendar.australia
240 Calendar of events in Australia.
241 .It Pa calendar.birthday
242 Births and deaths of famous (and not-so-famous) people.
243 .It Pa calendar.christian
244 Christian holidays.
245 This calendar should be updated yearly by the local system administrator
246 so that roving holidays are set correctly for the current year.
247 .It Pa calendar.computer
248 Days of special significance to computer people.
249 .It Pa calendar.croatian
250 Calendar of events in Croatia.
251 .It Pa calendar.dutch
252 Calendar of events in the Netherlands.
253 .It Pa calendar.freebsd
254 Birthdays of
255 .Fx
256 committers.
257 .It Pa calendar.french
258 Calendar of events in France.
259 .It Pa calendar.german
260 Calendar of events in Germany.
261 .It Pa calendar.history
262 Everything else, mostly U.S.\& historical events.
263 .It Pa calendar.holiday
264 Other holidays, including the not-well-known, obscure, and
265 .Em really
266 obscure.
267 .It Pa calendar.judaic
268 Jewish holidays.
269 The entries for this calendar have been obtained from the port
270 deskutils/hebcal.
271 .It Pa calendar.music
272 Musical events, births, and deaths.
273 Strongly oriented toward rock 'n' roll.
274 .It Pa calendar.newzealand
275 Calendar of events in New Zealand.
276 .It Pa calendar.russian
277 Russian calendar.
278 .It Pa calendar.southafrica
279 Calendar of events in South Africa.
280 .It Pa calendar.usholiday
281 U.S.\& holidays.
282 This calendar should be updated yearly by the local system administrator
283 so that roving holidays are set correctly for the current year.
284 .It Pa calendar.world
285 Includes all calendar files except for national files.
286 .El
287 .Sh COMPATIBILITY
288 The
289 .Nm
290 program previously selected lines which had the correct date anywhere
291 in the line.
292 This is no longer true, the date is only recognized when it occurs
293 at the beginning of a line.
294 .Sh SEE ALSO
295 .Xr at 1 ,
296 .Xr cpp 1 ,
297 .Xr mail 1 ,
298 .Xr cron 8
299 .Sh HISTORY
300 A
301 .Nm
302 command appeared in
303 .At v7 .
304 .Sh NOTES
305 Chinese New Year is calculated at 120 degrees east of Greenwich,
306 which roughly corresponds with the east coast of China.
307 For people west of China, this might result that the start of Chinese
308 New Year and the day of the related new moon might differ.
309 .Pp
310 The phases of the moon and the longitude of the sun are calculated
311 against the local position which corresponds with 30 degrees times
312 the time-difference towards Greenwich.
313 .Pp
314 The new and full moons are happening on the day indicated: They
315 might happen in the time period in the early night or in the late
316 evening.
317 It doesn't indicate that they are starting in the night on that date.
318 .Pp
319 Because of minor differences between the output of the formulas
320 used and other sources on the Internet, Druids and Werewolves should
321 double-check the start and end time of solar and lunar events.
322 .Sh BUGS
323 The
324 .Nm
325 utility does not handle Jewish holidays.
326 .Pp
327 There is no possibility to properly specify the local position
328 needed for solar and lunar calculations.