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

1.36    ! jmc         1: .\"    $OpenBSD: calendar.1,v 1.35 2011/09/13 13:23:33 jmc 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.
1.22      millert    14: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    15: .\"    may be used to endorse or promote products derived from this software
                     16: .\"    without specific prior written permission.
                     17: .\"
                     18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     21: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     28: .\" SUCH DAMAGE.
                     29: .\"
1.3       millert    30: .\"     @(#)calendar.1  8.1 (Berkeley) 6/29/93
1.1       deraadt    31: .\"
1.36    ! jmc        32: .Dd $Mdocdate: September 13 2011 $
1.1       deraadt    33: .Dt CALENDAR 1
                     34: .Os
                     35: .Sh NAME
                     36: .Nm calendar
                     37: .Nd reminder service
                     38: .Sh SYNOPSIS
1.10      aaron      39: .Nm calendar
1.24      jmc        40: .Op Fl ab
1.3       millert    41: .Op Fl A Ar num
                     42: .Op Fl B Ar num
1.15      mickey     43: .Op Fl f Ar calendarfile
1.34      jmc        44: .Sm off
                     45: .Op Fl "t " Oo Oo Oo Ar cc Oc Ar yy Oc Ar mm Oc Ar dd
                     46: .Sm on
1.1       deraadt    47: .Sh DESCRIPTION
1.3       millert    48: The
1.9       pjanzen    49: .Nm
1.1       deraadt    50: utility checks the current directory or the directory specified by the
1.5       aaron      51: .Ev CALENDAR_DIR
1.1       deraadt    52: environment variable for a file named
                     53: .Pa calendar
                     54: and displays lines that begin with either today's date
                     55: or tomorrow's.
                     56: On Fridays, events on Friday through Monday are displayed.
                     57: .Pp
1.12      aaron      58: The options are as follows:
1.1       deraadt    59: .Bl -tag -width Ds
1.25      jmc        60: .It Fl A Ar num
                     61: Print lines from today and next
                     62: .Ar num
                     63: days (forward, future).
1.1       deraadt    64: .It Fl a
1.9       pjanzen    65: Process the
                     66: .Dq calendar
                     67: files of all users and mail the results
1.1       deraadt    68: to them.
1.14      aaron      69: This requires superuser privileges.
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.25      jmc        74: .It Fl b
                     75: Enforce special date calculation mode for KOI8 calendars.
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.34      jmc        80: .Sm off
                     81: .It Fl "t " Oo Oo Oo Ar cc Oc Ar yy Oc Ar mm Oc Ar dd
                     82: .Sm on
1.9       pjanzen    83: Act like the specified value is
                     84: .Dq today
                     85: instead of using the current date.
1.35      jmc        86: If yy is specified, but cc is not,
                     87: a value for yy between 69 and 99 results in a cc value of 19.
                     88: Otherwise, a cc value of 20 is used.
1.1       deraadt    89: .El
                     90: .Pp
1.3       millert    91: To handle calendars in your national code table you can specify
                     92: .Dq LANG=<locale_name>
1.13      aaron      93: in the calendar file as early as possible.
                     94: To handle national Easter names in the calendars,
1.3       millert    95: .Dq Easter=<national_name>
                     96: (for Catholic Easter) or
                     97: .Dq Paskha=<national_name>
                     98: (for Orthodox Easter) can be used.
1.26      mickey     99: .Pp
1.27      jmc       100: The
1.26      mickey    101: .Dq CALENDAR
                    102: variable can be used to specify the style.
                    103: Only
                    104: .Sq Julian
                    105: and
                    106: .Sq Gregorian
                    107: styles are currently supported.
                    108: Use
                    109: .Dq CALENDAR=
                    110: to return to the default (Gregorian).
1.16      mickey    111: .Pp
                    112: To enforce special date calculation mode for Cyrillic calendars
                    113: you should specify
                    114: .Dq LANG=<local_name>
                    115: and
1.17      mickey    116: .Dq BODUN=<bodun_prefix>
                    117: where <local_name> can be ru_RU.KOI8-R, uk_UA.KOI8-U or by_BY.KOI8-B.
1.3       millert   118: .Pp
                    119: Other lines should begin with a month and day.
1.1       deraadt   120: They may be entered in almost any format, either numeric or as character
                    121: strings.
1.3       millert   122: If proper locale is set, national months and weekdays
                    123: names can be used.
1.5       aaron     124: A single asterisk (`*') matches every month.
1.1       deraadt   125: A day without a month matches that day of every week.
                    126: A month without a day matches the first of that month.
                    127: Two numbers default to the month followed by the day.
                    128: Lines with leading tabs default to the last entered date, allowing
                    129: multiple line specifications for a single date.
1.9       pjanzen   130: .Dq Easter
                    131: (may be followed by a positive or negative integer) is Easter for this year.
                    132: .Dq Paskha
                    133: (may be followed by a positive or negative integer) is
1.3       millert   134: Orthodox Easter for this year.
1.9       pjanzen   135: Weekdays may be followed by
                    136: .Dq -4
                    137: .Li ...
                    138: .Dq +5
                    139: (aliases last, first, second, third, fourth) for moving events like
                    140: .Dq the last Monday in April .
1.3       millert   141: .Pp
1.5       aaron     142: By convention, dates followed by an asterisk
                    143: .Pq Sq *
                    144: are not fixed, i.e., change
1.1       deraadt   145: from year to year.
                    146: .Pp
1.5       aaron     147: Day descriptions start after the first <tab> character in the line;
                    148: if the line does not contain a <tab> character, it isn't printed out.
                    149: If the first character in the line is a <tab> character, it is treated as
1.8       pjanzen   150: the continuation of the previous description.
1.3       millert   151: .Pp
1.9       pjanzen   152: The calendar file is preprocessed by
1.1       deraadt   153: .Xr cpp 1 ,
                    154: allowing the inclusion of shared files such as company holidays or
                    155: meetings.
                    156: If the shared file is not referenced by a full pathname,
                    157: .Xr cpp 1
                    158: searches in the current (or home) directory first, and then in the
                    159: directory
                    160: .Pa /usr/share/calendar .
                    161: Empty lines and lines protected by the C commenting syntax
                    162: .Pq Li /* ... */
                    163: are ignored.
                    164: .Pp
1.27      jmc       165: Some possible calendar entries
                    166: (a \fB\et\fR sequence denotes a <tab> character):
1.1       deraadt   167: .Bd -unfilled -offset indent
1.3       millert   168: LANG=C
                    169: Easter=Ostern
                    170:
                    171: #include <calendar.usholiday>
                    172: #include <calendar.birthday>
                    173:
                    174: 6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day).
                    175: Jun. 15\fB\et\fRJune 15.
                    176: 15 June\fB\et\fRJune 15.
                    177: Thursday\fB\et\fREvery Thursday.
1.27      jmc       178: June\fB\et\fREvery June 1st.
1.3       millert   179: 15 *\fB\et\fR15th of every month.
1.1       deraadt   180:
1.27      jmc       181: May Sun+2\fB\et\fRsecond Sunday in May (Muttertag)
                    182: 04/SunLast\fB\et\fRlast Sunday in April,
                    183: \fB\et\fRsummer time in Europe
1.3       millert   184: Easter\fB\et\fREaster
1.27      jmc       185: Ostern-2\fB\et\fRGood Friday (2 days before Easter)
                    186: Paskha\fB\et\fROrthodox Easter
1.1       deraadt   187: .Ed
                    188: .Sh FILES
1.5       aaron     189: .Bl -tag -width ~/.calendar/calendar -compact
1.3       millert   190: .It Pa calendar
1.25      jmc       191: File in current directory.
1.3       millert   192: .It Pa ~/.calendar
1.25      jmc       193: Directory in the user's home directory (which
1.9       pjanzen   194: .Nm
1.25      jmc       195: changes into, if it exists).
1.3       millert   196: .It Pa ~/.calendar/calendar
1.25      jmc       197: File to use if no calendar file exists in the current directory.
1.3       millert   198: .It Pa ~/.calendar/nomail
1.9       pjanzen   199: .Nm
1.25      jmc       200: will not send mail if this file exists.
1.29      xsa       201: .It Pa calendar.all
                    202: International and national calendar files.
1.1       deraadt   203: .It Pa calendar.birthday
1.25      jmc       204: Births and deaths of famous (and not-so-famous) people.
1.36    ! jmc       205: .It Pa calendar.canada
        !           206: Canadian holidays.
1.1       deraadt   207: .It Pa calendar.christian
1.8       pjanzen   208: Christian holidays (should be updated yearly by the local system administrator
1.25      jmc       209: so that roving holidays are set correctly for the current year).
1.1       deraadt   210: .It Pa calendar.computer
1.25      jmc       211: Days of special significance to computer people.
                    212: .It Pa calendar.croatian
                    213: Croatian calendar.
1.31      jmc       214: .It Pa calendar.discord
                    215: Discordian calendar (all rites reversed).
1.18      mickey    216: .It Pa calendar.fictional
1.25      jmc       217: Fantasy and fiction dates (mostly LOTR).
                    218: .It Pa calendar.french
                    219: French calendar.
                    220: .It Pa calendar.german
                    221: German calendar.
1.1       deraadt   222: .It Pa calendar.history
1.32      jmc       223: Miscellaneous history.
1.1       deraadt   224: .It Pa calendar.holiday
1.25      jmc       225: Other holidays (including the not-well-known, obscure, and
1.1       deraadt   226: .Em really
1.25      jmc       227: obscure).
1.1       deraadt   228: .It Pa calendar.judaic
1.5       aaron     229: Jewish holidays (should be updated yearly by the local system administrator
1.25      jmc       230: so that roving holidays are set correctly for the current year).
1.1       deraadt   231: .It Pa calendar.music
1.25      jmc       232: Musical events, births, and deaths (strongly oriented toward rock n' roll).
1.19      fgsch     233: .It Pa calendar.openbsd
                    234: .Ox
1.25      jmc       235: related events.
1.18      mickey    236: .It Pa calendar.pagan
1.25      jmc       237: Pagan holidays, celebrations and festivals.
                    238: .It Pa calendar.russian
                    239: Russian calendar.
1.32      jmc       240: .It Pa calendar.space
                    241: Cosmic history.
                    242: .It Pa calendar.ushistory
                    243: U.S. history.
1.1       deraadt   244: .It Pa calendar.usholiday
1.25      jmc       245: U.S. holidays.
1.18      mickey    246: .It Pa calendar.world
1.25      jmc       247: World wide calendar.
1.1       deraadt   248: .El
                    249: .Sh SEE ALSO
                    250: .Xr at 1 ,
1.12      aaron     251: .Xr cal 1 ,
1.1       deraadt   252: .Xr cpp 1 ,
1.5       aaron     253: .Xr mail 1 ,
                    254: .Xr cron 8
1.23      jmc       255: .Sh STANDARDS
1.1       deraadt   256: The
1.11      aaron     257: .Nm
1.1       deraadt   258: program previously selected lines which had the correct date anywhere
                    259: in the line.
1.12      aaron     260: This is no longer true: the date is only recognized when it occurs
1.3       millert   261: at the beginning of a line.
1.1       deraadt   262: .Sh HISTORY
                    263: A
                    264: .Nm
1.3       millert   265: command appeared in
1.1       deraadt   266: .At v7 .
                    267: .Sh BUGS
1.9       pjanzen   268: .Nm
1.28      mickey    269: doesn't handle all Jewish holidays or moon phases.