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