1.\" $NetBSD: calendar.1,v 1.12 2002/02/08 01:36:20 ross Exp $ 2.\" 3.\" Copyright (c) 1989, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 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. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 35.\" 36.Dd June 29, 1993 37.Dt CALENDAR 1 38.Os 39.Sh NAME 40.Nm calendar 41.Nd reminder service 42.Sh SYNOPSIS 43.Nm 44.Op Fl a 45.Op Fl f Ar file 46.Op Fl l Ar days 47.Op Fl w Ar days 48.Op Fl d Ar MMDD[[YY]YY] 49.Sh DESCRIPTION 50The 51.Nm 52utility processes text files and displays lines that match certain dates. 53.Pp 54The following options are available: 55.Bl -tag -width Ds 56.It Fl a 57Process the ``calendar'' files of all users and mail the results 58to them. 59This requires super-user privileges. 60.It Fl d Ar MMDD[[YY]YY] 61Display lines for the given date. By default, the current date is used. 62The year, which may be given in either two or four digit format, is used 63only for purposes of determining wether the given date falls on a Friday 64in that year (see below). If the year is not specified, the current 65year is assumed. 66.It Fl f Ar file 67Display matching calendar files from the given filename, by default 68.Pa calendar . 69The filename may be absolute. If not absolute, it is taken 70relative to the current directory or the directory specified by the 71.Dq Ev CALENDAR_DIR 72environment variable. Or, if the 73.Fl a 74flag is given, a non-absolute filename is taken relative to each user's 75home directory in turn. 76.It Fl l Ar days 77Causes the program to ``look ahead'' a given number of days (default 78one) from the specified date and display their entries as well. 79.It Fl w Ar days 80Causes the program to add the specified number of days to the ``look 81ahead'' number if and only if the day specified is a Friday. The default 82value is two, which causes 83.Nm 84to print entries through the weekend on Fridays. 85.El 86.Pp 87Lines should begin with a month and day. 88They may be entered in almost any format, either numeric or as character 89strings. 90A single asterisk (``*'') matches every month. 91A day without a month matches that day of every week. 92A month without a day matches the first of that month. 93Two numbers default to the month followed by the day. 94Lines with leading tabs default to the last entered date, allowing 95multiple line specifications for a single date. 96By convention, dates followed by an asterisk are not fixed, i.e., change 97from year to year. 98.Pp 99The ``calendar'' file is preprocessed by 100.Xr cpp 1 , 101allowing the inclusion of shared files such as company holidays or 102meetings. 103If the shared file is not referenced by a full pathname, 104.Xr cpp 1 105searches in the current (or home) directory first, and then in the 106directory 107.Pa /usr/share/calendar . 108Empty lines and lines protected by the C commenting syntax 109.Pq Li /* ... */ 110are ignored. 111.Pp 112Some possible calendar entries: 113.Bd -literal -offset indent 114#include \*[Lt]calendar.usholiday\*[Gt] 115#include \*[Lt]calendar.birthday\*[Gt] 116 1176/15 ... June 15 (if ambiguous, will default to month/day). 118Jun. 15 ... June 15. 11915 June ... June 15. 120Thursday ... Every Thursday. 121June ... Every June 1st. 12215 * ... 15th of every month. 123.Ed 124.Sh FILES 125The following default calendar files are provided: 126.Pp 127.Bl -tag -width calendar.christian -compact 128.It Pa calendar.birthday 129Births and deaths of famous (and not-so-famous) people. 130.It Pa calendar.christian 131Christian holidays. 132This calendar should be updated yearly by the local system administrator 133so that roving holidays are set correctly for the current year. 134.It Pa calendar.computer 135Days of special significance to computer people. 136.It Pa calendar.history 137Everything else, mostly U. S. historical events. 138.It Pa calendar.holiday 139Other holidays, including the not-well-known, obscure, and 140.Em really 141obscure. 142.It Pa calendar.judaic 143Jewish holidays. 144This calendar should be updated yearly by the local system administrator 145so that roving holidays are set correctly for the current year. 146.It Pa calendar.music 147Musical events, births, and deaths. 148Strongly oriented toward rock 'n' roll. 149.It Pa calendar.usholiday 150U.S. holidays. 151This calendar should be updated yearly by the local system administrator 152so that roving holidays are set correctly for the current year. 153.El 154.Sh SEE ALSO 155.Xr at 1 , 156.Xr cpp 1 , 157.Xr cron 8 158.Sh COMPATIBILITY 159The 160.Nm 161program previously selected lines which had the correct date anywhere 162in the line. 163This is no longer true, the date is only recognized when it occurs 164first on the line. 165.Sh HISTORY 166A 167.Nm 168command appeared in 169.At v7 . 170.Sh BUGS 171.Nm 172doesn't handle events that move around from year to year, i.e., 173``the last Monday in April''. 174