1997-12-19 21:41:21 +00:00
|
|
|
.\" Copyright (c) 1997 Wolfgang Helbig
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 01:08:13 +00:00
|
|
|
.\" $FreeBSD$
|
1997-12-19 21:41:21 +00:00
|
|
|
.\"
|
2019-03-07 10:19:40 +00:00
|
|
|
.Dd March 7, 2019
|
1997-12-15 20:35:22 +00:00
|
|
|
.Dt CAL 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm cal ,
|
|
|
|
.Nm ncal
|
2008-12-22 21:22:42 +00:00
|
|
|
.Nd displays a calendar and the date of Easter
|
1997-12-15 20:35:22 +00:00
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2010-03-07 21:54:28 +00:00
|
|
|
.Op Fl 3hjy
|
|
|
|
.Op Fl A Ar number
|
|
|
|
.Op Fl B Ar number
|
2001-01-15 16:49:28 +00:00
|
|
|
.Oo
|
|
|
|
.Op Ar month
|
|
|
|
.Ar year
|
|
|
|
.Oc
|
2004-11-23 22:57:17 +00:00
|
|
|
.Nm
|
2010-03-07 21:54:28 +00:00
|
|
|
.Op Fl 3hj
|
|
|
|
.Op Fl A Ar number
|
|
|
|
.Op Fl B Ar number
|
2004-11-23 22:57:17 +00:00
|
|
|
.Fl m Ar month
|
|
|
|
.Op Ar year
|
1997-12-15 20:35:22 +00:00
|
|
|
.Nm ncal
|
2010-03-07 21:54:28 +00:00
|
|
|
.Op Fl 3hjJpwy
|
|
|
|
.Op Fl A Ar number
|
|
|
|
.Op Fl B Ar number
|
1998-01-07 07:46:33 +00:00
|
|
|
.Op Fl s Ar country_code
|
2001-01-15 16:49:28 +00:00
|
|
|
.Oo
|
|
|
|
.Op Ar month
|
|
|
|
.Ar year
|
|
|
|
.Oc
|
1997-12-15 20:35:22 +00:00
|
|
|
.Nm ncal
|
2010-03-07 21:54:28 +00:00
|
|
|
.Op Fl 3hJeo
|
|
|
|
.Op Fl A Ar number
|
|
|
|
.Op Fl B Ar number
|
1997-12-15 20:35:22 +00:00
|
|
|
.Op Ar year
|
2010-03-21 21:33:21 +00:00
|
|
|
.Nm ncal
|
|
|
|
.Op Fl CN
|
|
|
|
.Op Fl H Ar yyyy-mm-dd
|
|
|
|
.Op Fl d Ar yyyy-mm
|
1997-12-15 20:35:22 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-04-20 12:18:28 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility displays a simple calendar in traditional format and
|
1997-12-15 20:35:22 +00:00
|
|
|
.Nm ncal
|
2008-12-22 21:22:42 +00:00
|
|
|
offers an alternative layout, more options and the date of Easter.
|
1997-12-15 20:35:22 +00:00
|
|
|
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.
|
1998-01-07 07:46:33 +00:00
|
|
|
.Pp
|
1997-12-15 20:35:22 +00:00
|
|
|
The options are as follows:
|
1998-01-07 07:46:33 +00:00
|
|
|
.Bl -tag -width indent
|
2009-05-02 07:02:31 +00:00
|
|
|
.It Fl h
|
|
|
|
Turns off highlighting of today.
|
1997-12-15 20:35:22 +00:00
|
|
|
.It Fl J
|
|
|
|
Display Julian Calendar, if combined with the
|
|
|
|
.Fl e
|
2008-12-22 21:22:42 +00:00
|
|
|
option, display date of Easter according to the Julian Calendar.
|
1997-12-15 20:35:22 +00:00
|
|
|
.It Fl e
|
2008-12-22 21:22:42 +00:00
|
|
|
Display date of Easter (for western churches).
|
1997-12-15 20:35:22 +00:00
|
|
|
.It Fl j
|
1997-12-19 21:41:21 +00:00
|
|
|
Display Julian days (days one-based, numbered from January 1).
|
2004-11-23 22:57:17 +00:00
|
|
|
.It Fl m Ar month
|
|
|
|
Display the specified
|
|
|
|
.Ar month .
|
2008-12-22 21:22:42 +00:00
|
|
|
If
|
|
|
|
.Ar month
|
|
|
|
is specified as a decimal number, it may be followed by the letter
|
|
|
|
.Ql f
|
|
|
|
or
|
|
|
|
.Ql p
|
|
|
|
to indicate the following or preceding month of that number,
|
|
|
|
respectively.
|
1997-12-15 20:35:22 +00:00
|
|
|
.It Fl o
|
2008-12-22 21:22:42 +00:00
|
|
|
Display date of Orthodox Easter (Greek and Russian
|
1997-12-15 20:35:22 +00:00
|
|
|
Orthodox Churches).
|
|
|
|
.It Fl p
|
1997-12-19 21:41:21 +00:00
|
|
|
Print the country codes and switching days from Julian to Gregorian
|
1997-12-15 20:35:22 +00:00
|
|
|
Calendar as they are assumed by
|
|
|
|
.Nm ncal .
|
1998-01-03 15:10:11 +00:00
|
|
|
The country code as determined from the local environment is marked
|
|
|
|
with an asterisk.
|
1998-01-07 07:46:33 +00:00
|
|
|
.It Fl s Ar country_code
|
1997-12-15 20:35:22 +00:00
|
|
|
Assume the switch from Julian to Gregorian Calendar at the date
|
|
|
|
associated with the
|
1998-01-07 07:46:33 +00:00
|
|
|
.Ar country_code .
|
1997-12-15 20:35:22 +00:00
|
|
|
If not specified,
|
|
|
|
.Nm ncal
|
1998-01-03 15:10:11 +00:00
|
|
|
tries to guess the switch date from the local environment or
|
2004-07-02 22:22:35 +00:00
|
|
|
falls back to September 2, 1752.
|
|
|
|
This was when Great
|
1998-01-03 15:10:11 +00:00
|
|
|
Britain and her colonies switched to the Gregorian Calendar.
|
1997-12-15 20:35:22 +00:00
|
|
|
.It Fl w
|
1997-12-19 21:41:21 +00:00
|
|
|
Print the number of the week below each week column.
|
1997-12-15 20:35:22 +00:00
|
|
|
.It Fl y
|
2004-11-23 22:57:17 +00:00
|
|
|
Display a calendar for the specified year.
|
2010-03-04 07:04:27 +00:00
|
|
|
.It Fl 3
|
|
|
|
Display the previous, current and next month surrounding today.
|
|
|
|
.It Fl A Ar number
|
|
|
|
Display the
|
|
|
|
.Ar number
|
|
|
|
of months after the current month.
|
|
|
|
.It Fl B Ar number
|
|
|
|
Display the
|
|
|
|
.Ar number
|
|
|
|
of months before the current month.
|
2010-03-21 21:33:21 +00:00
|
|
|
.It Fl C
|
|
|
|
Switch to
|
|
|
|
.Nm cal
|
|
|
|
mode.
|
|
|
|
.It Fl N
|
|
|
|
Switch to
|
|
|
|
.Nm ncal
|
|
|
|
mode.
|
2010-03-12 06:57:53 +00:00
|
|
|
.It Fl d Ar yyyy-mm
|
|
|
|
Use
|
|
|
|
.Ar yyyy-mm
|
|
|
|
as the current date (for debugging of date selection).
|
|
|
|
.It Fl H Ar yyyy-mm-dd
|
|
|
|
Use
|
|
|
|
.Ar yyyy-mm-dd
|
|
|
|
as the current date (for debugging of highlighting).
|
1997-12-15 20:35:22 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2008-12-22 21:22:42 +00:00
|
|
|
A single parameter specifies the year (1\(en9999) to be displayed;
|
1997-12-15 20:35:22 +00:00
|
|
|
note the year must be fully specified:
|
|
|
|
.Dq Li cal 89
|
|
|
|
will
|
|
|
|
.Em not
|
2018-06-09 04:40:17 +00:00
|
|
|
display a calendar for 1989.
|
|
|
|
Two parameters denote the month and
|
2010-03-04 07:04:27 +00:00
|
|
|
year; the month is either a number between 1 and 12, or a full or
|
2018-06-09 04:40:17 +00:00
|
|
|
abbreviated name as specified by the current locale.
|
|
|
|
Month and
|
2010-03-04 07:04:27 +00:00
|
|
|
year default to those of the current system clock and time zone (so
|
2004-11-23 22:57:17 +00:00
|
|
|
.Dq Li cal -m 8
|
2010-03-04 07:04:27 +00:00
|
|
|
will display a calendar for the month of August in the current
|
|
|
|
year).
|
1997-12-15 20:35:22 +00:00
|
|
|
.Pp
|
2018-06-09 04:40:17 +00:00
|
|
|
Not all options can be used together.
|
|
|
|
For example
|
2010-03-12 06:57:53 +00:00
|
|
|
.Dq Li -3 -A 2 -B 3 -y -m 7
|
|
|
|
would mean:
|
|
|
|
show me the three months around the seventh month, three before
|
|
|
|
that, two after that and the whole year.
|
|
|
|
.Nm ncal
|
|
|
|
will warn about these combinations.
|
|
|
|
.Pp
|
2008-12-22 21:22:42 +00:00
|
|
|
A year starts on January 1.
|
2011-07-11 10:42:36 +00:00
|
|
|
.Pp
|
2011-07-11 10:41:08 +00:00
|
|
|
Highlighting of dates is disabled if stdout is not a tty.
|
1997-12-15 20:35:22 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr calendar 3 ,
|
|
|
|
.Xr strftime 3
|
2020-03-29 04:14:57 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
|
|
|
X/Open System Interfaces option of the
|
|
|
|
.St -p1003.1-2008
|
|
|
|
specification.
|
|
|
|
.Pp
|
|
|
|
The flags
|
|
|
|
.Op Fl 3hyJeopw ,
|
|
|
|
as well as the ability to specify a month name as a single argument,
|
|
|
|
are extensions to that specification.
|
|
|
|
.Pp
|
|
|
|
The week number computed by
|
|
|
|
.Fl w
|
|
|
|
is compliant with the
|
|
|
|
.St -iso8601
|
|
|
|
specification.
|
1997-12-15 20:35:22 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
A
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1997-12-15 20:35:22 +00:00
|
|
|
command appeared in
|
2018-06-09 04:40:17 +00:00
|
|
|
.At v1 .
|
1997-12-15 20:35:22 +00:00
|
|
|
The
|
|
|
|
.Nm ncal
|
1998-04-26 06:21:29 +00:00
|
|
|
command appeared in
|
|
|
|
.Fx 2.2.6 .
|
1998-03-23 07:48:45 +00:00
|
|
|
.Sh AUTHORS
|
1998-04-26 06:21:29 +00:00
|
|
|
The
|
|
|
|
.Nm ncal
|
|
|
|
command and manual were written by
|
2014-06-23 08:23:05 +00:00
|
|
|
.An Wolfgang Helbig Aq Mt helbig@FreeBSD.org .
|
1998-01-03 15:10:11 +00:00
|
|
|
.Sh BUGS
|
2010-03-04 07:04:27 +00:00
|
|
|
The assignment of Julian\(enGregorian switching dates to country
|
|
|
|
codes is historically naive for many countries.
|
2010-03-09 06:43:35 +00:00
|
|
|
.Pp
|
|
|
|
Not all options are compatible and using them in different orders
|
|
|
|
will give varying results.
|
2019-03-07 10:19:40 +00:00
|
|
|
.Pp
|
|
|
|
It is not possible to display Monday as the first day of the week with
|
|
|
|
.Nm cal .
|