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