Merge from vendor branch PKGSRC:
[netbsd-mini2440.git] / usr.bin / cal / cal.1
bloba9ec18d68f3bbb640a9b87ec117bcd31d68d98f9
1 .\"     $NetBSD: cal.1,v 1.19 2007/12/21 14:21:42 joerg 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. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)cal.1       8.2 (Berkeley) 4/28/95
34 .\"
35 .Dd December 21, 2007
36 .Dt CAL 1
37 .Os
38 .Sh NAME
39 .Nm cal
40 .Nd displays a calendar
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl 3hjry
44 .Op Fl A Ar after
45 .Op Fl B Ar before
46 .Op Fl d Ar day-of-week
47 .Op Fl R Ar reform-spec
48 .Op Oo Ar month Oc Ar year
49 .Sh DESCRIPTION
50 .Nm
51 displays a simple calendar.
52 If arguments are not specified,
53 the current month is displayed.
54 The options are as follows:
55 .Bl -tag -width Ds
56 .It Fl 3
57 Same as
58 .Dq Fl A Ar 1 Fl B Ar 1 .
59 .It Fl A Ar after
60 Display
61 .Ar after
62 months after the specified month.
63 .It Fl B Ar before
64 Display
65 .Ar before
66 months before the specified month.
67 .It Fl d Ar day-of-week
68 Specifies the day of the week on which the calendar should start.
69 Valid values are 0 through 6, presenting Sunday through Saturday,
70 inclusively.
71 The default output starts on Sundays.
72 .It Fl h
73 Highlight the current day, if present in the displayed calendar.
74 If output is to a terminal, then the appropriate terminal sequences
75 are used, otherwise overstriking is used.
76 If more than one
77 .Fl h
78 is used and output is to a terminal, the current date will be
79 highlighted in inverse video instead of bold.
80 .It Fl j
81 Display Julian dates (days one-based, numbered from January 1).
82 .It Fl R Ar reform-spec
83 Selects an alternate Gregorian reform point from the default of
84 September 3rd, 1752.
85 The
86 .Ar reform-spec
87 can be selected by one of the built-in names (see
88 .Sx NOTES
89 for a list) or by a date of the form YYYY/MM/DD.
90 The date and month may be omitted, provided that what is specified
91 uniquely selects a given built-in reform point.
92 If an exact date is specified, then that date is taken to be the first
93 missing date of the Gregorian Reform to be applied.
94 .It Fl r
95 Display the month in which the Gregorian Reform adjustment was
96 applied, if no other
97 .Ar month
99 .Ar year
100 information is given.
101 If used in conjunction with
102 .Fl y ,
103 then the entire year is displayed.
104 .It Fl y
105 Display a calendar for the current year.
108 If no parameters are specified, the current month's calendar is
109 displayed.
110 A single parameter specifies the year and optionally the month
111 in ISO format:
112 .Dq Li cal 2007-12
113 Two parameters denote the month (1 - 12) and year.
114 Note that the century must be included in the year.
116 A year starts on Jan 1.
117 .Sh NOTES
118 In the USA and Great Britain the Gregorian Reformation occurred in 1752.
119 By this time, most countries had recognized the reformation (although a
120 few did not recognize it until the 1900's.)
121 Eleven days following September 2, 1752 were eliminated by the reformation,
122 so the calendar for that month is a bit unusual.
124 In view of the chaotic way the Gregorian calendar was adopted throughout
125 the world in the years between 1582 and 1928 make sure to take into account
126 the date of the Gregorian Reformation in your region if you are checking a
127 calendar for a very old date.
130 has a decent built-in list of Gregorian Reform dates and the names of
131 the countries where the reform was adopted:
133 .Bd -literal
134         Italy           Oct.  5, 1582   Denmark         Feb. 19, 1700
135         Spain           Oct.  5, 1582   Great Britain   Sep.  3, 1752
136         Portugal        Oct.  5, 1582   Sweden          Feb. 18, 1753
137         Poland          Oct.  5, 1582   Finland         Feb. 18, 1753
138         France          Dec. 12, 1582   Japan           Dec. 20, 1872
139         Luxembourg      Dec. 22, 1582   China           Nov.  7, 1911
140         Netherlands     Dec. 22, 1582   Bulgaria        Apr.  1, 1916
141         Bavaria         Oct.  6, 1583   U.S.S.R.        Feb.  1, 1918
142         Austria         Jan.  7, 1584   Serbia          Jan. 19, 1919
143         Switzerland     Jan. 12, 1584   Romania         Jan. 19, 1919
144         Hungary         Oct. 22, 1587   Greece          Mar. 10, 1924
145         Germany         Feb. 19, 1700   Turkey          Dec. 19, 1925
146         Norway          Feb. 19, 1700   Egypt           Sep. 18, 1928
149 The country known as
150 .Em Great Britain
151 can also be referred to as
152 .Em England
153 since that has less letters and no spaces in it.
154 This is meant only as a measure of expediency, not as a possible
155 slight to anyone involved.
156 .Sh HISTORY
159 command appeared in
160 .At v6 .