xref: /netbsd/usr.bin/cal/cal.1 (revision c4a72b64)
1.\"	$NetBSD: cal.1,v 1.13 2002/10/25 20:10:21 wiz Exp $
2.\"
3.\" Copyright (c) 1989, 1990, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software contributed to Berkeley by
7.\" Kim Letkeman.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"	This product includes software developed by the University of
20.\"	California, Berkeley and its contributors.
21.\" 4. Neither the name of the University nor the names of its contributors
22.\"    may be used to endorse or promote products derived from this software
23.\"    without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35.\" SUCH DAMAGE.
36.\"
37.\"     @(#)cal.1	8.2 (Berkeley) 4/28/95
38.\"
39.Dd October 25, 2002
40.Dt CAL 1
41.Os
42.Sh NAME
43.Nm cal
44.Nd displays a calendar
45.Sh SYNOPSIS
46.Nm
47.Op Fl jy3
48.Op Fl A after
49.Op Fl B before
50.Op Oo Ar month Oc Ar \ year
51.Sh DESCRIPTION
52.Nm
53displays a simple calendar.
54If arguments are not specified,
55the current month is displayed.
56The options are as follows:
57.Bl -tag -width Ds
58.It Fl A Ar after
59Display
60.Ar after
61months after the specified month.
62.It Fl B Ar before
63Display
64.Ar before
65months before the specified month.
66.It Fl j
67Display Julian dates (days one-based, numbered from January 1).
68.It Fl y
69Display a calendar for the current year.
70.It Fl 3
71Same as
72.Dq Fl A Ar 1 Fl B Ar 1 .
73.El
74.Pp
75A single parameter specifies the year (1 - 9999) to be displayed;
76note the year must be fully specified:
77.Dq Li cal 89
78will
79.Em not
80display a calendar for 1989.
81Two parameters denote the month (1 - 12) and year.
82If no parameters are specified, the current month's calendar is
83displayed.
84.Pp
85A year starts on Jan 1.
86.Pp
87In the USA and Great Britain the Gregorian Reformation occurred in 1752.
88By this time, most countries had recognized the reformation (although a
89few did not recognize it until the early 1900's.)
90Eleven days following September 2, 1752 were eliminated by the reformation,
91so the calendar for that month is a bit unusual.
92.Sh NOTES
93In view of the chaotic way the Gregorian calendar was adopted throughout
94the world in the years between 1582 and 1923 make sure to take into account
95the date of the Gregorian Reformation in your region if you are checking a
96calendar for a very old date.
97.Sh HISTORY
98A
99.Nm
100command appeared in
101.At v6 .
102