BSD 4_3_Net_2 release
[unix-history] / usr / src / usr.bin / calendar / calendar.1
CommitLineData
b5dc1377 1.\" Copyright (c) 1989, 1990 The Regents of the University of California.
f85e7486
KB
2.\" All rights reserved.
3.\"
af359dea
C
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.
f85e7486 19.\"
af359dea
C
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.
0edeeecc 31.\"
af359dea 32.\" @(#)calendar.1 6.13 (Berkeley) 6/17/91
b5dc1377 33.\"
af359dea 34.Dd June 17, 1991
b5dc1377 35.Dt CALENDAR 1
0e853b88 36.Os
b5dc1377
CL
37.Sh NAME
38.Nm calendar
39.Nd reminder service
40.Sh SYNOPSIS
41.Nm calendar
0e853b88 42.Op Fl a
b5dc1377
CL
43.Sh DESCRIPTION
44.Nm Calendar
45checks the current directory for a file named named
0e853b88 46.Pa calendar
b5dc1377
CL
47and displays lines that begin with either today's date
48or tomorrow's.
f85e7486 49On Fridays, events on Friday through Monday are displayed.
b5dc1377 50.Pp
f85e7486 51The following options are available:
0e853b88
CL
52.Bl -tag -width Ds
53.It Fl a
f85e7486
KB
54Process the ``calendar'' files of all users and mail the results
55to them.
56This requires super-user privileges.
0e853b88 57.El
b5dc1377 58.Pp
f85e7486
KB
59A month and day should begin lines.
60They may be entered in almost any format, either numeric or as character
61strings.
62A single asterisk (``*'') matches every month.
63A day without a month matches that day of every week.
64A month without a day matches the first of that month.
65Two numbers default to the month followed by the day.
49ada5ac 66Lines with leading tabs default to the last entered date, allowing
f85e7486
KB
67multiple line specifications for a single date.
68By convention, dates followed by an asterisk are not fixed, i.e. change
69from year to year.
b5dc1377 70.Pp
f85e7486 71The ``calendar'' file is preprocessed by
b5dc1377 72.Xr cpp 1 ,
f85e7486
KB
73allowing the inclusion of shared files such as company holidays or
74meetings.
75If the shared file is not referenced by a full pathname,
b5dc1377 76.Xr cpp 1
f85e7486
KB
77searches in the current (or home) directory first, and then in the
78directory
b5dc1377 79.Pa /usr/share/calendar .
0e853b88
CL
80Empty lines and lines protected by the C commenting syntax
81.Pq Li /* ... */
f85e7486 82are ignored.
b5dc1377 83.Pp
f85e7486 84Some possible calendar entries:
af359dea 85.Bd -unfilled -offset indent
f85e7486
KB
86#include <calendar.usholiday>
87#include <calendar.birthday>
b5dc1377 88
f93a9a69 896/15 ... June 15 (if ambiguous, will default to month/day).
f85e7486
KB
90Jun. 15 ... June 15.
9115 June ... June 15.
92Thursday ... Every Thursday.
93June ... Every June 1st.
9415 * ... 15th of every month.
0e853b88 95.Ed
b5dc1377 96.Sh FILES
f85e7486 97The following default calendar files are provided:
0e853b88
CL
98.Pp
99.Bl -tag -width calendar.christian -compact
100.It Pa calendar.birthday
d392c979 101Births and deaths of famous (and not-so-famous) people.
0e853b88 102.It Pa calendar.christian
4f0b6db5 103Christian holidays.
f85e7486
KB
104This calendar should be updated yearly by the local system administrator
105so that roving holidays are set correctly for the current year.
0e853b88 106.It Pa calendar.computer
c5bc05d7 107Days of special significance to computer people.
0e853b88 108.It Pa calendar.history
b5dc1377 109Everything else, mostly U. S. historical events.
0e853b88 110.It Pa calendar.holiday
b5dc1377
CL
111Other holidays, including the not-well-known, obscure, and
112.Em really
f85e7486 113obscure.
0e853b88 114.It Pa calendar.judaic
4f0b6db5
KB
115Jewish holidays.
116This calendar should be updated yearly by the local system administrator
117so that roving holidays are set correctly for the current year.
0e853b88 118.It Pa calendar.music
b5dc1377 119Musical events, births, and deaths.
0e853b88
CL
120Strongly oriented toward rock 'n' roll.
121.It Pa calendar.usholiday
4f0b6db5
KB
122U.S. holidays.
123This calendar should be updated yearly by the local system administrator
124so that roving holidays are set correctly for the current year.
0e853b88 125.El
b5dc1377
CL
126.Sh SEE ALSO
127.Xr at 1 ,
128.Xr cpp 1 ,
129.Xr cron 8
130.Xr mail 1 ,
131.Sh COMPATIBILITY
71fb7577 132The
b5dc1377 133.Nm calendar
71fb7577
KB
134program previously selected lines which had the correct date anywhere
135in the line.
136This is no longer true, the date is only recognized when it occurs
137first on the line.
b5dc1377
CL
138.Sh HISTORY
139A
140.Nm
141command appeared in Version 7 AT&T UNIX.
b5dc1377
CL
142.Sh BUGS
143.Nm Calendar
f85e7486
KB
144doesn't handle events that move around from year to year, i.e.
145``the last Monday in April''.