xref: /freebsd/usr.bin/ncal/ncal.1 (revision 4b2eaea43fec8e8792be611dea204071a10b655a)
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 December 16, 1997
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 jy
37.Oo
38.Op Ar month
39.Ar year
40.Oc
41.Nm ncal
42.Op Fl jJpwy
43.Op Fl s Ar country_code
44.Oo
45.Op Ar month
46.Ar year
47.Oc
48.Nm ncal
49.Op Fl Jeo
50.Op Ar year
51.Sh DESCRIPTION
52The
53.Nm
54utility displays a simple calendar in traditional format and
55.Nm ncal
56offers an alternative layout, more options and the date of easter.
57The new format is a little cramped but it makes a year fit
58on a 25x80 terminal.
59If arguments are not specified,
60the current month is displayed.
61.Pp
62The options are as follows:
63.Bl -tag -width indent
64.It Fl J
65Display Julian Calendar, if combined with the
66.Fl e
67option, display date of easter according to the Julian Calendar.
68.It Fl e
69Display date of easter (for western churches).
70.It Fl j
71Display Julian days (days one-based, numbered from January 1).
72.It Fl o
73Display date of orthodox easter (Greek and Russian
74Orthodox Churches).
75.It Fl p
76Print the country codes and switching days from Julian to Gregorian
77Calendar as they are assumed by
78.Nm ncal .
79The country code as determined from the local environment is marked
80with an asterisk.
81.It Fl s Ar country_code
82Assume the switch from Julian to Gregorian Calendar at the date
83associated with the
84.Ar country_code .
85If not specified,
86.Nm ncal
87tries to guess the switch date from the local environment or
88falls back to September 2, 1752. This was when Great
89Britain and her colonies switched to the Gregorian Calendar.
90.It Fl w
91Print the number of the week below each week column.
92.It Fl y
93Display a calendar for the current year.
94.El
95.Pp
96A single parameter specifies the year (1 - 9999) to be displayed;
97note the year must be fully specified:
98.Dq Li cal 89
99will
100.Em not
101display a calendar for 1989.
102Two parameters denote the month and year; the month is either a number between
1031 and 12, or a full or abbreviated name as specified by the current locale.
104.Pp
105A year starts on Jan 1.
106.Sh SEE ALSO
107.Xr calendar 3 ,
108.Xr strftime 3
109.Sh HISTORY
110A
111.Nm
112command appeared in
113.At v5 .
114The
115.Nm ncal
116command appeared in
117.Fx 2.2.6 .
118.Sh AUTHORS
119The
120.Nm ncal
121command and manual were written by
122.An Wolfgang Helbig Aq helbig@FreeBSD.org .
123.Sh BUGS
124The assignment of Julian - Gregorian switching dates to
125country codes is historically naive for many countries.
126