xref: /freebsd/usr.bin/ncal/ncal.1 (revision 830940567b49bb0c08dfaed40418999e76616909)
1.\" Copyright (c) 1997 Wolfgang Helbig
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd March 14, 2009
28.Dt CAL 1
29.Os
30.Sh NAME
31.Nm cal ,
32.Nm ncal
33.Nd displays a calendar and the date of Easter
34.Sh SYNOPSIS
35.Nm
36.Op Fl hjy
37.Oo
38.Op Ar month
39.Ar year
40.Oc
41.Nm
42.Op Fl hj
43.Fl m Ar month
44.Op Ar year
45.Nm ncal
46.Op Fl hjJpwy
47.Op Fl s Ar country_code
48.Oo
49.Op Ar month
50.Ar year
51.Oc
52.Nm ncal
53.Op Fl hJeo
54.Op Ar year
55.Sh DESCRIPTION
56The
57.Nm
58utility displays a simple calendar in traditional format and
59.Nm ncal
60offers an alternative layout, more options and the date of Easter.
61The new format is a little cramped but it makes a year fit
62on a 25x80 terminal.
63If arguments are not specified,
64the current month is displayed.
65.Pp
66The options are as follows:
67.Bl -tag -width indent
68.It Fl h
69Turns off highlighting of today.
70.It Fl J
71Display Julian Calendar, if combined with the
72.Fl e
73option, display date of Easter according to the Julian Calendar.
74.It Fl e
75Display date of Easter (for western churches).
76.It Fl j
77Display Julian days (days one-based, numbered from January 1).
78.It Fl m Ar month
79Display the specified
80.Ar month .
81If
82.Ar month
83is specified as a decimal number, it may be followed by the letter
84.Ql f
85or
86.Ql p
87to indicate the following or preceding month of that number,
88respectively.
89.It Fl o
90Display date of Orthodox Easter (Greek and Russian
91Orthodox Churches).
92.It Fl p
93Print the country codes and switching days from Julian to Gregorian
94Calendar as they are assumed by
95.Nm ncal .
96The country code as determined from the local environment is marked
97with an asterisk.
98.It Fl s Ar country_code
99Assume the switch from Julian to Gregorian Calendar at the date
100associated with the
101.Ar country_code .
102If not specified,
103.Nm ncal
104tries to guess the switch date from the local environment or
105falls back to September 2, 1752.
106This was when Great
107Britain and her colonies switched to the Gregorian Calendar.
108.It Fl w
109Print the number of the week below each week column.
110.It Fl y
111Display a calendar for the specified year.
112.El
113.Pp
114A single parameter specifies the year (1\(en9999) to be displayed;
115note the year must be fully specified:
116.Dq Li cal 89
117will
118.Em not
119display a calendar for 1989.
120Two parameters denote the month and year; the month is either a number between
1211 and 12, or a full or abbreviated name as specified by the current locale.
122Month and year default to those of the current system clock and time zone (so
123.Dq Li cal -m 8
124will display a calendar for the month of August in the current year).
125.Pp
126A year starts on January 1.
127.Sh SEE ALSO
128.Xr calendar 3 ,
129.Xr strftime 3
130.Sh HISTORY
131A
132.Nm
133command appeared in
134.At v5 .
135The
136.Nm ncal
137command appeared in
138.Fx 2.2.6 .
139.Sh AUTHORS
140The
141.Nm ncal
142command and manual were written by
143.An Wolfgang Helbig Aq helbig@FreeBSD.org .
144.Sh BUGS
145The assignment of Julian\(enGregorian switching dates to
146country codes is historically naive for many countries.
147