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