572 lines
7.3 KiB
HTML
572 lines
7.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CAL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CAL</H1>
|
|
Section: User Commands (1)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
<BR>BSD mandoc<BR>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
|
|
|
|
<B>cal</B>
|
|
|
|
|
|
<B>ncal</B>
|
|
|
|
- displays a calendar and the date of Easter
|
|
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B></B>
|
|
|
|
|
|
[-<B>31jy</B>
|
|
|
|
]
|
|
|
|
[-<B>A </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>B </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[[<I>month</I>
|
|
|
|
]
|
|
|
|
|
|
<I>year</I>
|
|
|
|
]
|
|
<BR><B></B>
|
|
|
|
|
|
[-<B>31j</B>
|
|
|
|
]
|
|
|
|
[-<B>A </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>B </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
-<B>m </B><I>month</I>
|
|
|
|
|
|
|
|
[<I>year</I>
|
|
|
|
]
|
|
|
|
<BR><B>ncal</B>
|
|
|
|
[-<B>C</B>
|
|
|
|
]
|
|
|
|
[-<B>31jy</B>
|
|
|
|
]
|
|
|
|
[-<B>A </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>B </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[[<I>month</I>
|
|
|
|
]
|
|
|
|
|
|
<I>year</I>
|
|
|
|
]
|
|
<BR><B>ncal</B>
|
|
|
|
[-<B>C</B>
|
|
|
|
]
|
|
|
|
[-<B>31j</B>
|
|
|
|
]
|
|
|
|
[-<B>A </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>B </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
-<B>m </B><I>month</I>
|
|
|
|
|
|
|
|
[<I>year</I>
|
|
|
|
]
|
|
|
|
<BR><B>ncal</B>
|
|
|
|
[-<B>31bhjJpwySM</B>
|
|
|
|
]
|
|
|
|
[-<B>A </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>B </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>H </B><I>yyyy-mm-dd</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>s </B><I>country_code</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[[<I>month</I>
|
|
|
|
]
|
|
|
|
|
|
<I>year</I>
|
|
|
|
]
|
|
<BR><B>ncal</B>
|
|
|
|
[-<B>31bhJeoSM</B>
|
|
|
|
]
|
|
|
|
[-<B>A </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>B </B><I>number</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[-<B>d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
]
|
|
|
|
[<I>year</I>
|
|
|
|
]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B></B>
|
|
|
|
|
|
utility displays a simple calendar in traditional format and
|
|
<B>ncal</B>
|
|
|
|
offers an alternative layout, more options and the date of Easter.
|
|
The new format is a little cramped but it makes a year fit
|
|
on a 25x80 terminal.
|
|
If arguments are not specified,
|
|
the current month is displayed.
|
|
<P>
|
|
|
|
The options are as follows:
|
|
<DL COMPACT>
|
|
<P>
|
|
|
|
<DT id="1"><B>-h</B>
|
|
|
|
|
|
<DD>
|
|
Turns off highlighting of today.
|
|
<DT id="2"><B>-J</B>
|
|
|
|
|
|
<DD>
|
|
Display Julian Calendar, if combined with the
|
|
-<B>o</B>
|
|
|
|
option, display date of Orthodox Easter according to the Julian Calendar.
|
|
<DT id="3"><B>-e</B>
|
|
|
|
|
|
<DD>
|
|
Display date of Easter (for western churches).
|
|
<DT id="4"><B>-j</B>
|
|
|
|
|
|
<DD>
|
|
Display Julian days (days one-based, numbered from January 1).
|
|
<DT id="5"><B>-m </B><I>month</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Display the specified
|
|
<I>month</I>
|
|
|
|
|
|
If
|
|
<I>month</I>
|
|
|
|
is specified as a decimal number, appending
|
|
`f'
|
|
|
|
or
|
|
`p'
|
|
|
|
displays the same month of the following or previous year respectively.
|
|
<DT id="6"><B>-o</B>
|
|
|
|
|
|
<DD>
|
|
Display date of Orthodox Easter (Greek and Russian
|
|
Orthodox Churches).
|
|
<DT id="7"><B>-p</B>
|
|
|
|
|
|
<DD>
|
|
Print the country codes and switching days from Julian to Gregorian
|
|
Calendar as they are assumed by
|
|
<B>ncal</B>
|
|
|
|
|
|
The country code as determined from the local environment is marked
|
|
with an asterisk.
|
|
<DT id="8"><B>-s </B><I>country_code</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Assume the switch from Julian to Gregorian Calendar at the date
|
|
associated with the
|
|
<I>country_code</I>
|
|
|
|
|
|
If not specified,
|
|
<B>ncal</B>
|
|
|
|
tries to guess the switch date from the local environment or
|
|
falls back to September 2, 1752.
|
|
This was when Great
|
|
Britain and her colonies switched to the Gregorian Calendar.
|
|
<DT id="9"><B>-w</B>
|
|
|
|
|
|
<DD>
|
|
Print the number of the week below each week column.
|
|
<DT id="10"><B>-y</B>
|
|
|
|
|
|
<DD>
|
|
Display a calendar for the specified year. This option is implied when
|
|
a year but no month are specified on the command line.
|
|
<DT id="11"><B>-3</B>
|
|
|
|
|
|
<DD>
|
|
Display the previous, current and next month surrounding today.
|
|
<DT id="12"><B>-1</B>
|
|
|
|
|
|
<DD>
|
|
Display only the current month. This is the default.
|
|
<DT id="13"><B>-A </B><I>number</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Months to add after. The specified number of months is added to the
|
|
end of the display. This is in addition to any date range selected by the
|
|
-<B>y</B>
|
|
|
|
|
|
-<B>3</B>
|
|
|
|
|
|
or
|
|
-<B>1</B>
|
|
|
|
options. For example,
|
|
``<B>cal -y -B2 -A2</B>
|
|
|
|
''
|
|
|
|
shows everything from November of the previous year to
|
|
February of the following year. Negative numbers are allowed, in which
|
|
case the specified number of months is subtracted. For example,
|
|
``<B>cal -y -B-6 </B>
|
|
|
|
''
|
|
|
|
shows July to December. And
|
|
``<B>cal -A11</B>
|
|
|
|
''
|
|
|
|
simply shows the next 12 months.
|
|
<DT id="14"><B>-B </B><I>number</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Months to add before. The specified number of months is added to the
|
|
beginning of the display. See
|
|
-<B>A</B>
|
|
|
|
for examples.
|
|
<DT id="15"><B>-C</B>
|
|
|
|
|
|
<DD>
|
|
Completely switch to
|
|
<B>cal</B>
|
|
|
|
mode. For
|
|
<B>cal</B>
|
|
|
|
like output only, use
|
|
-<B>b</B>
|
|
|
|
instead.
|
|
<DT id="16"><B>-N</B>
|
|
|
|
|
|
<DD>
|
|
Switch to
|
|
<B>ncal</B>
|
|
|
|
mode.
|
|
<DT id="17"><B>-d </B><I>yyyy-mm</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Use
|
|
<I>yyyy-mm</I>
|
|
|
|
as the current date (for debugging of date selection).
|
|
<DT id="18"><B>-H </B><I>yyyy-mm-dd</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Use
|
|
<I>yyyy-mm-dd</I>
|
|
|
|
as the current date (for debugging of highlighting).
|
|
<DT id="19"><B>-M</B>
|
|
|
|
|
|
<DD>
|
|
Weeks start on Monday.
|
|
<DT id="20"><B>-S</B>
|
|
|
|
|
|
<DD>
|
|
Weeks start on Sunday.
|
|
<DT id="21"><B>-b</B>
|
|
|
|
|
|
<DD>
|
|
Use oldstyle format for ncal output.
|
|
</DL>
|
|
<P>
|
|
|
|
<P>
|
|
|
|
A single parameter specifies the year (1-9999) to be displayed;
|
|
note the year must be fully specified:
|
|
``<B>cal 89</B>
|
|
|
|
''
|
|
|
|
will
|
|
<I>not</I>
|
|
|
|
display a calendar for 1989. Two parameters denote the month and
|
|
year; the month is either a number between 1 and 12, or a full or
|
|
abbreviated name as specified by the current locale. Month and
|
|
year default to those of the current system clock and time zone (so
|
|
``<B>cal -m 8</B>
|
|
|
|
''
|
|
|
|
will display a calendar for the month of August in the current
|
|
year).
|
|
<P>
|
|
|
|
Not all options can be used together. For example, the options
|
|
-<B>y , 3 , </B>
|
|
|
|
and
|
|
-<B>1 </B>
|
|
|
|
are mutually exclusive. If inconsistent options are given, the later
|
|
ones take precedence over the earlier ones.
|
|
<P>
|
|
|
|
A year starts on January 1.
|
|
<P>
|
|
|
|
Highlighting of dates is disabled if stdout is not a tty.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?3+calendar">calendar</A>(3),
|
|
|
|
|
|
<A HREF="/cgi-bin/man/man2html?3+strftime">strftime</A>(3)
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>HISTORY</H2>
|
|
|
|
A
|
|
<B></B>
|
|
|
|
|
|
command appeared in
|
|
AT&T System
|
|
v5 .
|
|
The
|
|
<B>ncal</B>
|
|
|
|
command appeared in
|
|
Fx 2.2.6 .
|
|
|
|
The output of the
|
|
<B>cal</B>
|
|
|
|
command is supposed to be bit for bit compatible to the original Unix
|
|
<B>cal</B>
|
|
|
|
command, because its output is processed by other programs like CGI scripts,
|
|
that should not be broken. Therefore it will always output 8 lines, even if
|
|
only 7 contain data. This extra blank line also appears with the original
|
|
<B>cal</B>
|
|
|
|
command, at least on Solaris 8
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
The
|
|
<B>ncal</B>
|
|
|
|
command and manual were written by
|
|
An Wolfgang Helbig Aq Mt <A HREF="mailto:helbig@FreeBSD.org">helbig@FreeBSD.org</A> .
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
The assignment of Julian-Gregorian switching dates to country
|
|
codes is historically naive for many countries.
|
|
<P>
|
|
|
|
Not all options are compatible and using them in different orders
|
|
will give varying results.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="24"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="25"><A HREF="#lbAE">SEE ALSO</A><DD>
|
|
<DT id="26"><A HREF="#lbAF">HISTORY</A><DD>
|
|
<DT id="27"><A HREF="#lbAG">AUTHORS</A><DD>
|
|
<DT id="28"><A HREF="#lbAH">BUGS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:19 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|