[BACK]Return to calendar.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / calendar

Annotation of src/usr.bin/calendar/calendar.1, Revision 1.6

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