version 1.4, 1997/08/26 23:37:20 |
version 1.5, 1998/09/23 04:32:36 |
|
|
The |
The |
.Nm calendar |
.Nm calendar |
utility checks the current directory or the directory specified by the |
utility checks the current directory or the directory specified by the |
.Dq Ev CALENDAR_DIR |
.Ev CALENDAR_DIR |
environment variable for a file named |
environment variable for a file named |
.Pa calendar |
.Pa calendar |
and displays lines that begin with either today's date |
and displays lines that begin with either today's date |
|
|
to them. |
to them. |
This requires super-user privileges. |
This requires super-user privileges. |
.It Fl A Ar num |
.It Fl A Ar num |
print lines from today and next |
Print lines from today and next |
.Ar num |
.Ar num |
days (forward, future) |
days (forward, future). |
.It Fl B Ar num |
.It Fl B Ar num |
print lines from today and previous |
Print lines from today and previous |
.Ar num |
.Ar num |
days (backward, past) |
days (backward, past). |
.It Fl f Pa calendarfile |
.It Fl f Pa calendarfile |
use |
Use |
.Pa calendarfile |
.Pa calendarfile |
as default calendar file. |
as the default calendar file. |
.It Fl t Ar [[[yy]yy][mm]]dd |
.It Fl t Ar [[[yy]yy][mm]]dd |
act like the specified value is ``today'' instead of using the current date. |
Act like the specified value is ``today'' instead of using the current date. |
.El |
.El |
.Pp |
.Pp |
To handle calendars in your national code table you can specify |
To handle calendars in your national code table you can specify |
.Dq LANG=<locale_name> |
.Dq LANG=<locale_name> |
in the calendar file as early as possible. To handle national Easter |
in the calendar file as early as possible. To handle national Easter |
names in the calendars |
names in the calendars, |
.Dq Easter=<national_name> |
.Dq Easter=<national_name> |
(for Catholic Easter) or |
(for Catholic Easter) or |
.Dq Paskha=<national_name> |
.Dq Paskha=<national_name> |
|
|
strings. |
strings. |
If proper locale is set, national months and weekdays |
If proper locale is set, national months and weekdays |
names can be used. |
names can be used. |
A single asterisk (``*'') matches every month. |
A single asterisk (`*') matches every month. |
A day without a month matches that day of every week. |
A day without a month matches that day of every week. |
A month without a day matches the first of that month. |
A month without a day matches the first of that month. |
Two numbers default to the month followed by the day. |
Two numbers default to the month followed by the day. |
Lines with leading tabs default to the last entered date, allowing |
Lines with leading tabs default to the last entered date, allowing |
multiple line specifications for a single date. |
multiple line specifications for a single date. |
``Easter'', may be followed by an positive or negative integer, is |
``Easter'' (may be followed by a positive or negative integer) is |
Easter for this year. |
Easter for this year. |
``Paskha'', may be followed by an positive or negative integer, is |
``Paskha'' (may be followed by a positive or negative integer) is |
Orthodox Easter for this year. |
Orthodox Easter for this year. |
Weekdays may be followed by ``-4'' ... ``+5'' (aliases |
Weekdays may be followed by ``-4'' ... ``+5'' (aliases |
last, first, second, third, fourth) for moving events like |
last, first, second, third, fourth) for moving events like |
``the last Monday in April'' |
``the last Monday in April''. |
.Pp |
.Pp |
By convention, dates followed by an asterisk are not fixed, i.e., change |
By convention, dates followed by an asterisk |
|
.Pq Sq * |
|
are not fixed, i.e., change |
from year to year. |
from year to year. |
.Pp |
.Pp |
Day description start after the first <tab> character in the line; |
Day descriptions start after the first <tab> character in the line; |
if the line not contains <tab> character, it isn't printed out. |
if the line does not contain a <tab> character, it isn't printed out. |
If the first character in the line is a <tab> character, it is treated as |
If the first character in the line is a <tab> character, it is treated as |
continue of previous description. |
continue of previous description. |
.Pp |
.Pp |
The ``calendar'' file is preprocessed by |
The ``calendar'' file is preprocessed by |
|
|
.Pq Li /* ... */ |
.Pq Li /* ... */ |
are ignored. |
are ignored. |
.Pp |
.Pp |
Some possible calendar entries (<tab> characters highlighted by |
Some possible calendar entries (<tab> characters are highlighted by a |
\fB\et\fR sequence) |
\fB\et\fR sequence): |
.Bd -unfilled -offset indent |
.Bd -unfilled -offset indent |
LANG=C |
LANG=C |
Easter=Ostern |
Easter=Ostern |
|
|
Paskha\fB\et\fROrthodox Easter |
Paskha\fB\et\fROrthodox Easter |
.Ed |
.Ed |
.Sh FILES |
.Sh FILES |
.Pp |
.Bl -tag -width ~/.calendar/calendar -compact |
.Bl -tag -width calendar.christian -compact |
|
.It Pa calendar |
.It Pa calendar |
file in current directory |
file in current directory |
|
|
.It Pa ~/.calendar |
.It Pa ~/.calendar |
.Pa calendar |
file in home directory (which |
HOME directory. |
|
.Nm calendar |
.Nm calendar |
does a chdir into this directory if it exists. |
.Xr chdir 1 's |
|
into if it exists) |
.It Pa ~/.calendar/calendar |
.It Pa ~/.calendar/calendar |
calendar file to use if no calendar file exists in the current directory. |
file to use if no calendar file exists in the current directory |
|
|
.It Pa ~/.calendar/nomail |
.It Pa ~/.calendar/nomail |
do not send mail if this file exists. |
.Nm calendar |
.El |
will not send mail if this file exists |
|
|
The following default calendar files are provided: |
|
.Pp |
|
.Bl -tag -width calendar.christian -compact |
|
.It Pa calendar.birthday |
.It Pa calendar.birthday |
Births and deaths of famous (and not-so-famous) people. |
births and deaths of famous (and not-so-famous) people |
|
|
.It Pa calendar.christian |
.It Pa calendar.christian |
Christian holidays. |
christian holidays (should be updated yearly by the local system administrator |
This calendar should be updated yearly by the local system administrator |
so that roving holidays are set correctly for the current year) |
so that roving holidays are set correctly for the current year. |
|
|
|
.It Pa calendar.computer |
.It Pa calendar.computer |
Days of special significance to computer people. |
days of special significance to computer people |
|
|
.It Pa calendar.history |
.It Pa calendar.history |
Everything else, mostly U. S. historical events. |
everything else, mostly U.S. historical events |
|
|
.It Pa calendar.holiday |
.It Pa calendar.holiday |
Other holidays, including the not-well-known, obscure, and |
other holidays (including the not-well-known, obscure, and |
.Em really |
.Em really |
obscure. |
obscure) |
|
|
.It Pa calendar.judaic |
.It Pa calendar.judaic |
Jewish holidays. |
Jewish holidays (should be updated yearly by the local system administrator |
This calendar should be updated yearly by the local system administrator |
so that roving holidays are set correctly for the current year) |
so that roving holidays are set correctly for the current year. |
|
|
|
.It Pa calendar.music |
.It Pa calendar.music |
Musical events, births, and deaths. |
musical events, births, and deaths (strongly oriented toward rock n' roll) |
Strongly oriented toward rock 'n' roll. |
|
|
|
.It Pa calendar.usholiday |
.It Pa calendar.usholiday |
U.S. holidays. |
U.S. holidays (should be updated yearly by the local system administrator |
This calendar should be updated yearly by the local system administrator |
so that roving holidays are set correctly for the current year) |
so that roving holidays are set correctly for the current year. |
|
|
|
.It Pa calendar.german |
.It Pa calendar.german |
German calendar. |
German calendar |
|
|
.It Pa calendar.russian |
.It Pa calendar.russian |
Russian calendar. |
Russian calendar |
.El |
.El |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr at 1 , |
.Xr at 1 , |
.Xr cpp 1 , |
.Xr cpp 1 , |
.Xr cron 8 , |
.Xr mail 1 , |
.Xr mail 1 |
.Xr cron 8 |
.Sh COMPATIBILITY |
.Sh COMPATIBILITY |
The |
The |
.Nm calendar |
.Nm calendar |
|
|
command appeared in |
command appeared in |
.At v7 . |
.At v7 . |
.Sh BUGS |
.Sh BUGS |
.Nm Calendar |
.Nm calendar |
doesn't handle Jewish holidays and moon phases. |
doesn't handle Jewish holidays or moon phases. |