.TH calendar "" "" Command
.PC "Reminder service"
\fBcalendar [ \-a ] [ \-f\fIfile\fB ]... [ \-d[\fIdate\^\fB] ] [ \-w[\fIdate\^\fB] ] [ -m[\fImonth\^\fB] ]\fR
.PP
.HS
.SH Options:
.IC \fB\-a\fR
Search calendars of all users and send mail
.IC \fB\-f\fIfile\fR
Search each \fIfile\fR in order given
.IC \fB\-d[\fIdate\fB]\fR
Print all entries matching \fIdate\fR
.IC \fB\-w[\fIdate\fB]\fR
Print entries in the week beginning with \fIdate\fR
.IC \fB\-m[\fImonth\fB]\fR
Print entries in the given \fImonth\fR
.Pp
The default calendar is \fB$HOME/.calendar\fR.
The default date is today.
.HE
.B calendar
is the \*(CO system's \*(QLreminder service\*(QR.
It reads a calendar file, which should contain information organized by date;
if an event is scheduled to happen today or tomorrow,
.B calendar
prints the entry on the standard output.
Thus, you can use
.B calendar
to remind you of both one-time events (such as appointments) and yearly
events (such as anniversaries).
.PP
.B calendar
recognizes the following command-line options:
.IP \fB\-a\fR 1.1i
Search the calendars of all users and send mail.
Default is to search only your calendar.
.IP \fB\-f\fIfile\fR
Search each ``file'' in order given.
Default is \fB$HOME/.calendar\fR.
.IP \fB\-d[\fIdate\^\fR]\fR
Print all entries for ``date''.
Default date is today.
.IP \fB\-w[\fIdate\^\fB]\fR
Print all entries for the week beginning with ``date''.
.IP \fB\-m[\fImonth\^\fB]\fR
Print entries for the given ``month''.
.PP
By default,
.B calendar
print entries for today and tomorrow, with ``tomorrow''
encompassing the following Monday should ``today'' be a Friday or Saturday.
If an entry in your
.B .calendar
has an at-sign `@' embedded in it,
.B calendar
prints it regardless of when it is to occur, until its date has passed.
.PP
The following gives an example of a calendar file.
As you can see, \fBcalendar\fR understands different formats of dates:
.DM
.ta 0.8i 1.5i
	Apr 16	Dave's birthday
	7/6	Dad's birthday
	Sep 26	Mom's birthday
	Jun 30	Barry's birthday
	10/4	Marianne's birthday
	Jul 31	Anniversary!
	Mar 16	Pot luck luncheon
.DE
.PP
You can run
.B calendar
automatically by embedding the command
.DM
.ta 0.8i
	calendar
.DE
.PP
in your \fB.profile\fR.
.PP
If you wish, you can run
.B calendar
automatically for yourself, by inserting it into file
.BR /usr/spool/cron/crontabs/root .
In this case,
.B calendar
should be used with its
.B \-a
option, to force it to search each user's
.B $HOME
directory for \fB.calendar\fR and mail the appointments it finds
to that user.
.SH "See Also"
.Xr commands commands
.SH Notes
.BR calendar 's
notion of tomorrow understands weekends but not holidays.
Thus, if you invoke
.B calendar
on a Friday,
it returns the events for that day and the following Saturday, Sunday,
and Monday.
If Monday is a holiday, however, you will not receive appointments
for Tuesday.
