[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.9

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