Annotation of src/usr.bin/calendar/calendar.1, Revision 1.27
1.27 ! jmc 1: .\" $OpenBSD: calendar.1,v 1.26 2004/12/10 15:00:27 mickey 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.24 jmc 40: .Op Fl ab
1.3 millert 41: .Op Fl A Ar num
42: .Op Fl B Ar num
1.15 mickey 43: .Op Fl f Ar calendarfile
1.7 millert 44: .Op Fl t Ar [[[cc]yy][mm]]dd
1.1 deraadt 45: .Sh DESCRIPTION
1.3 millert 46: The
1.9 pjanzen 47: .Nm
1.1 deraadt 48: utility checks the current directory or the directory specified by the
1.5 aaron 49: .Ev CALENDAR_DIR
1.1 deraadt 50: environment variable for a file named
51: .Pa calendar
52: and displays lines that begin with either today's date
53: or tomorrow's.
54: On Fridays, events on Friday through Monday are displayed.
55: .Pp
1.12 aaron 56: The options are as follows:
1.1 deraadt 57: .Bl -tag -width Ds
1.25 jmc 58: .It Fl A Ar num
59: Print lines from today and next
60: .Ar num
61: days (forward, future).
1.1 deraadt 62: .It Fl a
1.9 pjanzen 63: Process the
64: .Dq calendar
65: files of all users and mail the results
1.1 deraadt 66: to them.
1.14 aaron 67: This requires superuser privileges.
1.3 millert 68: .It Fl B Ar num
1.5 aaron 69: Print lines from today and previous
1.3 millert 70: .Ar num
1.5 aaron 71: days (backward, past).
1.25 jmc 72: .It Fl b
73: Enforce special date calculation mode for KOI8 calendars.
1.3 millert 74: .It Fl f Pa calendarfile
1.5 aaron 75: Use
1.3 millert 76: .Pa calendarfile
1.5 aaron 77: as the default calendar file.
1.7 millert 78: .It Fl t Ar [[[cc]yy][mm]]dd
1.9 pjanzen 79: Act like the specified value is
80: .Dq today
81: instead of using the current date.
1.1 deraadt 82: .El
83: .Pp
1.3 millert 84: To handle calendars in your national code table you can specify
85: .Dq LANG=<locale_name>
1.13 aaron 86: in the calendar file as early as possible.
87: To handle national Easter names in the calendars,
1.3 millert 88: .Dq Easter=<national_name>
89: (for Catholic Easter) or
90: .Dq Paskha=<national_name>
91: (for Orthodox Easter) can be used.
1.26 mickey 92: .Pp
1.27 ! jmc 93: The
1.26 mickey 94: .Dq CALENDAR
95: variable can be used to specify the style.
96: Only
97: .Sq Julian
98: and
99: .Sq Gregorian
100: styles are currently supported.
101: Use
102: .Dq CALENDAR=
103: to return to the default (Gregorian).
1.16 mickey 104: .Pp
105: To enforce special date calculation mode for Cyrillic calendars
106: you should specify
107: .Dq LANG=<local_name>
108: and
1.17 mickey 109: .Dq BODUN=<bodun_prefix>
110: where <local_name> can be ru_RU.KOI8-R, uk_UA.KOI8-U or by_BY.KOI8-B.
1.3 millert 111: .Pp
112: Other lines should begin with a month and day.
1.1 deraadt 113: They may be entered in almost any format, either numeric or as character
114: strings.
1.3 millert 115: If proper locale is set, national months and weekdays
116: names can be used.
1.5 aaron 117: A single asterisk (`*') matches every month.
1.1 deraadt 118: A day without a month matches that day of every week.
119: A month without a day matches the first of that month.
120: Two numbers default to the month followed by the day.
121: Lines with leading tabs default to the last entered date, allowing
122: multiple line specifications for a single date.
1.9 pjanzen 123: .Dq Easter
124: (may be followed by a positive or negative integer) is Easter for this year.
125: .Dq Paskha
126: (may be followed by a positive or negative integer) is
1.3 millert 127: Orthodox Easter for this year.
1.9 pjanzen 128: Weekdays may be followed by
129: .Dq -4
130: .Li ...
131: .Dq +5
132: (aliases last, first, second, third, fourth) for moving events like
133: .Dq the last Monday in April .
1.3 millert 134: .Pp
1.5 aaron 135: By convention, dates followed by an asterisk
136: .Pq Sq *
137: are not fixed, i.e., change
1.1 deraadt 138: from year to year.
139: .Pp
1.5 aaron 140: Day descriptions start after the first <tab> character in the line;
141: if the line does not contain a <tab> character, it isn't printed out.
142: If the first character in the line is a <tab> character, it is treated as
1.8 pjanzen 143: the continuation of the previous description.
1.3 millert 144: .Pp
1.9 pjanzen 145: The calendar file is preprocessed by
1.1 deraadt 146: .Xr cpp 1 ,
147: allowing the inclusion of shared files such as company holidays or
148: meetings.
149: If the shared file is not referenced by a full pathname,
150: .Xr cpp 1
151: searches in the current (or home) directory first, and then in the
152: directory
153: .Pa /usr/share/calendar .
154: Empty lines and lines protected by the C commenting syntax
155: .Pq Li /* ... */
156: are ignored.
157: .Pp
1.27 ! jmc 158: Some possible calendar entries
! 159: (a \fB\et\fR sequence denotes a <tab> character):
1.1 deraadt 160: .Bd -unfilled -offset indent
1.3 millert 161: LANG=C
162: Easter=Ostern
163:
164: #include <calendar.usholiday>
165: #include <calendar.birthday>
166:
167: 6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day).
168: Jun. 15\fB\et\fRJune 15.
169: 15 June\fB\et\fRJune 15.
170: Thursday\fB\et\fREvery Thursday.
1.27 ! jmc 171: June\fB\et\fREvery June 1st.
1.3 millert 172: 15 *\fB\et\fR15th of every month.
1.1 deraadt 173:
1.27 ! jmc 174: May Sun+2\fB\et\fRsecond Sunday in May (Muttertag)
! 175: 04/SunLast\fB\et\fRlast Sunday in April,
! 176: \fB\et\fRsummer time in Europe
1.3 millert 177: Easter\fB\et\fREaster
1.27 ! jmc 178: Ostern-2\fB\et\fRGood Friday (2 days before Easter)
! 179: Paskha\fB\et\fROrthodox Easter
1.1 deraadt 180: .Ed
181: .Sh FILES
1.5 aaron 182: .Bl -tag -width ~/.calendar/calendar -compact
1.3 millert 183: .It Pa calendar
1.25 jmc 184: File in current directory.
1.3 millert 185: .It Pa ~/.calendar
1.25 jmc 186: Directory in the user's home directory (which
1.9 pjanzen 187: .Nm
1.25 jmc 188: changes into, if it exists).
1.3 millert 189: .It Pa ~/.calendar/calendar
1.25 jmc 190: File to use if no calendar file exists in the current directory.
1.3 millert 191: .It Pa ~/.calendar/nomail
1.9 pjanzen 192: .Nm
1.25 jmc 193: will not send mail if this file exists.
1.1 deraadt 194: .It Pa calendar.birthday
1.25 jmc 195: Births and deaths of famous (and not-so-famous) people.
1.1 deraadt 196: .It Pa calendar.christian
1.8 pjanzen 197: Christian holidays (should be updated yearly by the local system administrator
1.25 jmc 198: so that roving holidays are set correctly for the current year).
1.1 deraadt 199: .It Pa calendar.computer
1.25 jmc 200: Days of special significance to computer people.
201: .It Pa calendar.croatian
202: Croatian calendar.
1.18 mickey 203: .It Pa calendar.fictional
1.25 jmc 204: Fantasy and fiction dates (mostly LOTR).
205: .It Pa calendar.french
206: French calendar.
207: .It Pa calendar.german
208: German calendar.
1.1 deraadt 209: .It Pa calendar.history
1.25 jmc 210: Everything else, mostly U.S. historical events.
1.1 deraadt 211: .It Pa calendar.holiday
1.25 jmc 212: Other holidays (including the not-well-known, obscure, and
1.1 deraadt 213: .Em really
1.25 jmc 214: obscure).
1.1 deraadt 215: .It Pa calendar.judaic
1.5 aaron 216: Jewish holidays (should be updated yearly by the local system administrator
1.25 jmc 217: so that roving holidays are set correctly for the current year).
1.1 deraadt 218: .It Pa calendar.music
1.25 jmc 219: Musical events, births, and deaths (strongly oriented toward rock n' roll).
1.19 fgsch 220: .It Pa calendar.openbsd
221: .Ox
1.25 jmc 222: related events.
1.18 mickey 223: .It Pa calendar.pagan
1.25 jmc 224: Pagan holidays, celebrations and festivals.
225: .It Pa calendar.russian
226: Russian calendar.
1.1 deraadt 227: .It Pa calendar.usholiday
1.25 jmc 228: U.S. holidays.
1.18 mickey 229: .It Pa calendar.world
1.25 jmc 230: World wide calendar.
1.1 deraadt 231: .El
232: .Sh SEE ALSO
233: .Xr at 1 ,
1.12 aaron 234: .Xr cal 1 ,
1.1 deraadt 235: .Xr cpp 1 ,
1.5 aaron 236: .Xr mail 1 ,
237: .Xr cron 8
1.23 jmc 238: .Sh STANDARDS
1.1 deraadt 239: The
1.11 aaron 240: .Nm
1.1 deraadt 241: program previously selected lines which had the correct date anywhere
242: in the line.
1.12 aaron 243: This is no longer true: the date is only recognized when it occurs
1.3 millert 244: at the beginning of a line.
1.1 deraadt 245: .Sh HISTORY
246: A
247: .Nm
1.3 millert 248: command appeared in
1.1 deraadt 249: .At v7 .
250: .Sh BUGS
1.9 pjanzen 251: .Nm
1.5 aaron 252: doesn't handle Jewish holidays or moon phases.