]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.bin/ncal/ncal.1
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.bin / ncal / ncal.1
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 3hjy
37 .Op Fl A Ar number
38 .Op Fl B Ar number
39 .Oo
40 .Op Ar month
41 .Ar year
42 .Oc
43 .Nm
44 .Op Fl 3hj
45 .Op Fl A Ar number
46 .Op Fl B Ar number
47 .Fl m Ar month
48 .Op Ar year
49 .Nm ncal
50 .Op Fl 3hjJpwy
51 .Op Fl A Ar number
52 .Op Fl B Ar number
53 .Op Fl s Ar country_code
54 .Oo
55 .Op Ar month
56 .Ar year
57 .Oc
58 .Nm ncal
59 .Op Fl 3hJeo
60 .Op Fl A Ar number
61 .Op Fl B Ar number
62 .Op Ar year
63 .Nm ncal
64 .Op Fl CN
65 .Op Fl H Ar yyyy-mm-dd
66 .Op Fl d Ar yyyy-mm
67 .Sh DESCRIPTION
68 The
69 .Nm
70 utility displays a simple calendar in traditional format and
71 .Nm ncal
72 offers an alternative layout, more options and the date of Easter.
73 The new format is a little cramped but it makes a year fit
74 on a 25x80 terminal.
75 If arguments are not specified,
76 the current month is displayed.
77 .Pp
78 The options are as follows:
79 .Bl -tag -width indent
80 .It Fl h
81 Turns off highlighting of today.
82 .It Fl J
83 Display Julian Calendar, if combined with the
84 .Fl e
85 option, display date of Easter according to the Julian Calendar.
86 .It Fl e
87 Display date of Easter (for western churches).
88 .It Fl j
89 Display Julian days (days one-based, numbered from January 1).
90 .It Fl m Ar month
91 Display the specified
92 .Ar month .
93 If
94 .Ar month
95 is specified as a decimal number, it may be followed by the letter
96 .Ql f
97 or
98 .Ql p
99 to indicate the following or preceding month of that number,
100 respectively.
101 .It Fl o
102 Display date of Orthodox Easter (Greek and Russian
103 Orthodox Churches).
104 .It Fl p
105 Print the country codes and switching days from Julian to Gregorian
106 Calendar as they are assumed by
107 .Nm ncal .
108 The country code as determined from the local environment is marked
109 with an asterisk.
110 .It Fl s Ar country_code
111 Assume the switch from Julian to Gregorian Calendar at the date
112 associated with the
113 .Ar country_code .
114 If not specified,
115 .Nm ncal
116 tries to guess the switch date from the local environment or
117 falls back to September 2, 1752.
118 This was when Great
119 Britain and her colonies switched to the Gregorian Calendar.
120 .It Fl w
121 Print the number of the week below each week column.
122 .It Fl y
123 Display a calendar for the specified year.
124 .It Fl 3
125 Display the previous, current and next month surrounding today.
126 .It Fl A Ar number
127 Display the
128 .Ar number
129 of months after the current month.
130 .It Fl B Ar number
131 Display the
132 .Ar number
133 of months before the current month.
134 .It Fl C
135 Switch to
136 .Nm cal
137 mode.
138 .It Fl N
139 Switch to
140 .Nm ncal
141 mode.
142 .It Fl d Ar yyyy-mm
143 Use
144 .Ar yyyy-mm
145 as the current date (for debugging of date selection).
146 .It Fl H Ar yyyy-mm-dd
147 Use
148 .Ar yyyy-mm-dd
149 as the current date (for debugging of highlighting).
150 .El
151 .Pp
152 A single parameter specifies the year (1\(en9999) to be displayed;
153 note the year must be fully specified:
154 .Dq Li cal 89
155 will
156 .Em not
157 display a calendar for 1989.  Two parameters denote the month and
158 year; the month is either a number between 1 and 12, or a full or
159 abbreviated name as specified by the current locale.  Month and
160 year default to those of the current system clock and time zone (so
161 .Dq Li cal -m 8
162 will display a calendar for the month of August in the current
163 year).
164 .Pp
165 Not all options can be used together. For example
166 .Dq Li -3 -A 2 -B 3 -y -m 7
167 would mean:
168 show me the three months around the seventh month, three before
169 that, two after that and the whole year.
170 .Nm ncal
171 will warn about these combinations.
172 .Pp
173 A year starts on January 1.
174 .Pp
175 Highlighting of dates is disabled if stdout is not a tty.
176 .Sh SEE ALSO
177 .Xr calendar 3 ,
178 .Xr strftime 3
179 .Sh HISTORY
180 A
181 .Nm
182 command appeared in
183 .At v5 .
184 The
185 .Nm ncal
186 command appeared in
187 .Fx 2.2.6 .
188 .Sh AUTHORS
189 The
190 .Nm ncal
191 command and manual were written by
192 .An Wolfgang Helbig Aq helbig@FreeBSD.org .
193 .Sh BUGS
194 The assignment of Julian\(enGregorian switching dates to country
195 codes is historically naive for many countries.
196 .Pp
197 Not all options are compatible and using them in different orders
198 will give varying results.