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