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