1.\" Copyright (c) 1989, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 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. 19.\" 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. 31.\" 32.\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 33.\" $FreeBSD$ 34.\" 35.Dd June 29, 1993 36.Dt CALENDAR 1 37.Os 38.Sh NAME 39.Nm calendar 40.Nd reminder service 41.Sh SYNOPSIS 42.Nm calendar 43.Op Fl a 44.Op Fl A Ar num 45.Op Fl B Ar num 46.Oo Fl t Ar dd 47.Sm off 48.Op . Ar mm Op . Ar year 49.Sm on 50.Oc 51.Op Fl f Ar calendarfile 52.Sh DESCRIPTION 53.Nm Calendar 54checks the current directory for a file named 55.Pa calendar 56and displays lines that begin with either today's date 57or tomorrow's. 58On Fridays, events on Friday through Monday are displayed. 59.Pp 60The following options are available: 61.Bl -tag -width Ds 62.It Fl a 63Process the ``calendar'' files of all users and mail the results 64to them. 65This requires super-user privileges. 66.It Fl A Ar num 67Print lines from today and the next 68.Ar num 69days (forward, future). 70.It Fl B Ar num 71Print lines from today and the previous 72.Ar num 73days (backward, past). 74.It Fl f Pa calendarfile 75Use 76.Pa calendarfile 77as the default calendar file. 78.It Xo Fl t 79.Sm off 80.Ar dd 81.Op . Ar mm Op . Ar year 82.Sm on 83.Xc 84For test purposes only: set date directly to argument values. 85.El 86.Pp 87To handle calendars in your national code table you can specify 88.Dq LANG=<locale_name> 89in the calendar file as early as possible. To handle national Easter 90names in the calendars 91.Dq Easter=<national_name> 92(for Catholic Easter) or 93.Dq Paskha=<national_name> 94(for Orthodox Easter) can be used. 95.Pp 96Other lines should begin with a month and day. 97They may be entered in almost any format, either numeric or as character 98strings. 99If the proper locale is set, national month and weekday 100names can be used. 101A single asterisk (``*'') matches every month. 102A day without a month matches that day of every week. 103A month without a day matches the first of that month. 104Two numbers default to the month followed by the day. 105Lines with leading tabs default to the last entered date, allowing 106multiple line specifications for a single date. 107.Pp 108``Easter'', is Easter for this year, and may be followed by a positive 109or negative integer. 110.Pp 111``Paskha'', is Orthodox Easter for this year, and may be followed by a 112positive or negative integer. 113.Pp 114Weekdays may be followed by ``-4'' ... ``+5'' (aliases for 115last, first, second, third, fourth) for moving events like 116``the last Monday in April'' 117.Pp 118By convention, dates followed by an asterisk are not fixed, i.e., change 119from year to year. 120.Pp 121Day descriptions start after the first <tab> character in the line; 122if the line does not contain a <tab> character, it is not displayed. 123If the first character in the line is a <tab> character, it is treated as 124a continuation of the previous line. 125.Pp 126The ``calendar'' file is preprocessed by 127.Xr cpp 1 , 128allowing the inclusion of shared files such as company holidays or 129meetings. 130If the shared file is not referenced by a full pathname, 131.Xr cpp 1 132searches in the current (or home) directory first, and then in the 133directory 134.Pa /usr/share/calendar . 135Empty lines and lines protected by the C commenting syntax 136.Pq Li /* ... */ 137are ignored. 138.Pp 139Some possible calendar entries (<tab> characters highlighted by 140\fB\et\fR sequence) 141.Bd -unfilled -offset indent 142LANG=C 143Easter=Ostern 144 145#include <calendar.usholiday> 146#include <calendar.birthday> 147 1486/15\fB\et\fRJune 15 (if ambiguous, will default to month/day). 149Jun. 15\fB\et\fRJune 15. 15015 June\fB\et\fRJune 15. 151Thursday\fB\et\fREvery Thursday. 152June\fB\et\fREvery June 1st. 15315 *\fB\et\fR15th of every month. 154 155May Sun+2\fB\et\fRsecond Sunday in May (Muttertag) 15604/SunLast\fB\et\fRlast Sunday in April, 157\fB\et\fRsummer time in Europe 158Easter\fB\et\fREaster 159Ostern-2\fB\et\fRGood Friday (2 days before Easter) 160Paskha\fB\et\fROrthodox Easter 161 162.Ed 163.Sh FILES 164.Pp 165.Bl -tag -width calendar.christian -compact 166.It Pa calendar 167file in current directory 168.It Pa ~/.calendar 169.Pa calendar 170HOME directory. 171.Nm calendar 172does a chdir into this directory if it exists. 173.It Pa ~/.calendar/calendar 174calendar file to use if no calendar file exists in the current directory. 175.It Pa ~/.calendar/nomail 176do not send mail if this file exists. 177.El 178.Pp 179The following default calendar files are provided: 180.Pp 181.Bl -tag -width calendar.christian -compact 182.It Pa calendar.birthday 183Births and deaths of famous (and not-so-famous) people. 184.It Pa calendar.christian 185Christian holidays. 186This calendar should be updated yearly by the local system administrator 187so that roving holidays are set correctly for the current year. 188.It Pa calendar.computer 189Days of special significance to computer people. 190.It Pa calendar.history 191Everything else, mostly U.S. historical events. 192.It Pa calendar.holiday 193Other holidays, including the not-well-known, obscure, and 194.Em really 195obscure. 196.It Pa calendar.judaic 197Jewish holidays. 198This calendar should be updated yearly by the local system administrator 199so that roving holidays are set correctly for the current year. 200.It Pa calendar.music 201Musical events, births, and deaths. 202Strongly oriented toward rock 'n' roll. 203.It Pa calendar.usholiday 204U.S. holidays. 205This calendar should be updated yearly by the local system administrator 206so that roving holidays are set correctly for the current year. 207.It Pa calendar.german 208German calendar. 209.It Pa calendar.russian 210Russian calendar. 211.El 212.Sh SEE ALSO 213.Xr at 1 , 214.Xr cpp 1 , 215.Xr mail 1 , 216.Xr cron 8 217.Sh COMPATIBILITY 218The 219.Nm calendar 220program previously selected lines which had the correct date anywhere 221in the line. 222This is no longer true, the date is only recognized when it occurs 223at the beginning of a line. 224.Sh HISTORY 225A 226.Nm 227command appeared in 228.At v7 . 229.Sh BUGS 230.Nm Calendar 231doesn't handle Jewish holidays and moon phases. 232