]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/calendar/calendar.1
mdoc(7) police: use the new features of the Nm macro.
[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 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)calendar.1  8.1 (Berkeley) 6/29/93
33 .\" $FreeBSD$
34 .\"
35 .Dd June 29, 1993
36 .Dt CALENDAR 1
37 .Os
38 .Sh NAME
39 .Nm calendar
40 .Nd reminder service
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl a
44 .Op Fl A Ar num
45 .Op Fl B Ar num
46 .Op Fl f Ar calendarfile
47 .Oo Fl t Ar dd
48 .Sm off
49 .Op . Ar mm Op . Ar year
50 .Sm on
51 .Oc
52 .Sh DESCRIPTION
53 .Nm Calendar
54 checks the current directory for a file named
55 .Pa calendar
56 and displays lines that begin with either today's date
57 or tomorrow's.
58 On Fridays, events on Friday through Monday are displayed.
59 .Pp
60 The following options are available:
61 .Bl -tag -width Ds
62 .It Fl a
63 Process the ``calendar'' files of all users and mail the results
64 to them.
65 This requires super-user privileges.
66 .It Fl A Ar num
67 Print lines from today and the next
68 .Ar num
69 days (forward, future).
70 .It Fl B Ar num
71 Print lines from today and the previous
72 .Ar num
73 days (backward, past).
74 .It Fl f Pa calendarfile
75 Use 
76 .Pa calendarfile
77 as the default calendar file.
78 .It Xo Fl t
79 .Sm off
80 .Ar dd
81 .Op . Ar mm Op . Ar year
82 .Sm on
83 .Xc
84 For test purposes only: set date directly to argument values.
85 .El
86 .Pp
87 To handle calendars in your national code table you can specify
88 .Dq LANG=<locale_name>
89 in the calendar file as early as possible.
90 To handle national Easter
91 names in the calendars
92 .Dq Easter=<national_name>
93 (for Catholic Easter) or
94 .Dq Paskha=<national_name>
95 (for Orthodox Easter) can be used.
96 .Pp
97 Other lines should begin with a month and day.
98 They may be entered in almost any format, either numeric or as character
99 strings.
100 If the proper locale is set, national month and weekday
101 names can be used.
102 A single asterisk (``*'') matches every month.
103 A day without a month matches that day of every week.
104 A month without a day matches the first of that month.
105 Two numbers default to the month followed by the day.
106 Lines with leading tabs default to the last entered date, allowing
107 multiple line specifications for a single date.
108 .Pp
109 ``Easter'', is Easter for this year, and may be followed by a positive
110 or negative integer.
111 .Pp
112 ``Paskha'', is Orthodox Easter for this year, and may be followed by a 
113 positive or negative integer.
114 .Pp
115 Weekdays may be followed by ``-4'' ... ``+5'' (aliases for
116 last, first, second, third, fourth) for moving events like 
117 ``the last Monday in April''
118 .Pp
119 By convention, dates followed by an asterisk are not fixed, i.e., change
120 from year to year.
121 .Pp
122 Day descriptions start after the first <tab> character in the line;
123 if the line does not contain a <tab> character, it is not displayed.
124 If the first character in the line is a <tab> character, it is treated as
125 a continuation of the previous line.
126 .Pp
127 The ``calendar'' file is preprocessed by
128 .Xr cpp 1 ,
129 allowing the inclusion of shared files such as company holidays or
130 meetings.
131 If the shared file is not referenced by a full pathname,
132 .Xr cpp 1
133 searches in the current (or home) directory first, and then in the
134 directory
135 .Pa /usr/share/calendar .
136 Empty lines and lines protected by the C commenting syntax
137 .Pq Li /* ... */
138 are ignored.
139 .Pp
140 Some possible calendar entries (<tab> characters highlighted by
141 \fB\et\fR sequence)
142 .Bd -unfilled -offset indent
143 LANG=C
144 Easter=Ostern
145
146 #include <calendar.usholiday>
147 #include <calendar.birthday>
148
149 6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day).
150 Jun. 15\fB\et\fRJune 15.
151 15 June\fB\et\fRJune 15.
152 Thursday\fB\et\fREvery Thursday.
153 June\fB\et\fREvery June 1st.
154 15 *\fB\et\fR15th of every month.
155
156 May Sun+2\fB\et\fRsecond Sunday in May (Muttertag)
157 04/SunLast\fB\et\fRlast Sunday in April,
158 \fB\et\fRsummer time in Europe
159 Easter\fB\et\fREaster
160 Ostern-2\fB\et\fRGood Friday (2 days before Easter)
161 Paskha\fB\et\fROrthodox Easter
162
163 .Ed
164 .Sh FILES
165 .Pp
166 .Bl -tag -width calendar.christian -compact
167 .It Pa calendar
168 file in current directory
169 .It Pa ~/.calendar
170 .Pa calendar
171 HOME directory. 
172 .Nm
173 does a chdir into this directory if it exists.
174 .It Pa ~/.calendar/calendar
175 calendar file to use if no calendar file exists in the current directory.
176 .It Pa ~/.calendar/nomail
177 do not send mail if this file exists.
178 .El
179 .Pp
180 The following default calendar files are provided:
181 .Pp
182 .Bl -tag -width calendar.christian -compact
183 .It Pa calendar.birthday
184 Births and deaths of famous (and not-so-famous) people.
185 .It Pa calendar.christian
186 Christian holidays.
187 This calendar should be updated yearly by the local system administrator
188 so that roving holidays are set correctly for the current year.
189 .It Pa calendar.computer
190 Days of special significance to computer people.
191 .It Pa calendar.history
192 Everything  else, mostly U.S. historical events.
193 .It Pa calendar.holiday
194 Other  holidays, including the not-well-known, obscure, and
195 .Em really
196 obscure.
197 .It Pa calendar.judaic
198 Jewish holidays.
199 This calendar should be updated yearly by the local system administrator
200 so that roving holidays are set correctly for the current year.
201 .It Pa calendar.music
202 Musical  events,  births, and deaths.
203 Strongly  oriented  toward  rock 'n' roll.
204 .It Pa calendar.usholiday
205 U.S. holidays.
206 This calendar should be updated yearly by the local system administrator
207 so that roving holidays are set correctly for the current year.
208 .It Pa calendar.german
209 German calendar.
210 .It Pa calendar.russian
211 Russian calendar.
212 .El
213 .Sh SEE ALSO
214 .Xr at 1 ,
215 .Xr cpp 1 ,
216 .Xr mail 1 ,
217 .Xr cron 8
218 .Sh COMPATIBILITY
219 The
220 .Nm
221 program previously selected lines which had the correct date anywhere
222 in the line.
223 This is no longer true, the date is only recognized when it occurs
224 at the beginning of a line.
225 .Sh HISTORY
226 A
227 .Nm
228 command appeared in
229 .At v7 .
230 .Sh BUGS
231 .Nm Calendar
232 doesn't handle Jewish holidays and moon phases.