xref: /freebsd/usr.bin/ncal/ncal.1 (revision 0851fbdf3bce91257140fc3436db47726af0c810)
1cb0f03a1SWolfgang Helbig.\" Copyright (c) 1997 Wolfgang Helbig
2cb0f03a1SWolfgang Helbig.\" All rights reserved.
3cb0f03a1SWolfgang Helbig.\"
4cb0f03a1SWolfgang Helbig.\" Redistribution and use in source and binary forms, with or without
5cb0f03a1SWolfgang Helbig.\" modification, are permitted provided that the following conditions
6cb0f03a1SWolfgang Helbig.\" are met:
7cb0f03a1SWolfgang Helbig.\" 1. Redistributions of source code must retain the above copyright
8cb0f03a1SWolfgang Helbig.\"    notice, this list of conditions and the following disclaimer.
9cb0f03a1SWolfgang Helbig.\" 2. Redistributions in binary form must reproduce the above copyright
10cb0f03a1SWolfgang Helbig.\"    notice, this list of conditions and the following disclaimer in the
11cb0f03a1SWolfgang Helbig.\"    documentation and/or other materials provided with the distribution.
12cb0f03a1SWolfgang Helbig.\"
13cb0f03a1SWolfgang Helbig.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14cb0f03a1SWolfgang Helbig.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15cb0f03a1SWolfgang Helbig.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16cb0f03a1SWolfgang Helbig.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17cb0f03a1SWolfgang Helbig.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18cb0f03a1SWolfgang Helbig.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19cb0f03a1SWolfgang Helbig.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20cb0f03a1SWolfgang Helbig.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21cb0f03a1SWolfgang Helbig.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22cb0f03a1SWolfgang Helbig.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23cb0f03a1SWolfgang Helbig.\" SUCH DAMAGE.
24cb0f03a1SWolfgang Helbig.\"
25c3aac50fSPeter Wemm.\" $FreeBSD$
26cb0f03a1SWolfgang Helbig.\"
274646cea7SDavid Schultz.Dd March 14, 2009
280cb2e609SWolfgang Helbig.Dt CAL 1
290cb2e609SWolfgang Helbig.Os
300cb2e609SWolfgang Helbig.Sh NAME
310cb2e609SWolfgang Helbig.Nm cal ,
320cb2e609SWolfgang Helbig.Nm ncal
33ba29aec0SGarrett Wollman.Nd displays a calendar and the date of Easter
340cb2e609SWolfgang Helbig.Sh SYNOPSIS
358fe908efSRuslan Ermilov.Nm
367149aa01SRoman Divacky.Op Fl hjy
37536e6834SRuslan Ermilov.Oo
38536e6834SRuslan Ermilov.Op Ar month
39536e6834SRuslan Ermilov.Ar year
40536e6834SRuslan Ermilov.Oc
410c4cafeaSGarrett Wollman.Nm
427149aa01SRoman Divacky.Op Fl hj
430c4cafeaSGarrett Wollman.Fl m Ar month
440c4cafeaSGarrett Wollman.Op Ar year
450cb2e609SWolfgang Helbig.Nm ncal
467149aa01SRoman Divacky.Op Fl hjJpwy
47a99e4564SPhilippe Charnier.Op Fl s Ar country_code
48536e6834SRuslan Ermilov.Oo
49536e6834SRuslan Ermilov.Op Ar month
50536e6834SRuslan Ermilov.Ar year
51536e6834SRuslan Ermilov.Oc
520cb2e609SWolfgang Helbig.Nm ncal
537149aa01SRoman Divacky.Op Fl hJeo
540cb2e609SWolfgang Helbig.Op Ar year
550cb2e609SWolfgang Helbig.Sh DESCRIPTION
56e8937ba0SPhilippe CharnierThe
57e8937ba0SPhilippe Charnier.Nm
58e8937ba0SPhilippe Charnierutility displays a simple calendar in traditional format and
590cb2e609SWolfgang Helbig.Nm ncal
60ba29aec0SGarrett Wollmanoffers an alternative layout, more options and the date of Easter.
610cb2e609SWolfgang HelbigThe new format is a little cramped but it makes a year fit
620cb2e609SWolfgang Helbigon a 25x80 terminal.
630cb2e609SWolfgang HelbigIf arguments are not specified,
640cb2e609SWolfgang Helbigthe current month is displayed.
65a99e4564SPhilippe Charnier.Pp
660cb2e609SWolfgang HelbigThe options are as follows:
67a99e4564SPhilippe Charnier.Bl -tag -width indent
687149aa01SRoman Divacky.It Fl h
697149aa01SRoman DivackyTurns off highlighting of today.
700cb2e609SWolfgang Helbig.It Fl J
710cb2e609SWolfgang HelbigDisplay Julian Calendar, if combined with the
720cb2e609SWolfgang Helbig.Fl e
73ba29aec0SGarrett Wollmanoption, display date of Easter according to the Julian Calendar.
740cb2e609SWolfgang Helbig.It Fl e
75ba29aec0SGarrett WollmanDisplay date of Easter (for western churches).
760cb2e609SWolfgang Helbig.It Fl j
77cb0f03a1SWolfgang HelbigDisplay Julian days (days one-based, numbered from January 1).
780c4cafeaSGarrett Wollman.It Fl m Ar month
790c4cafeaSGarrett WollmanDisplay the specified
800c4cafeaSGarrett Wollman.Ar month .
81ba29aec0SGarrett WollmanIf
82ba29aec0SGarrett Wollman.Ar month
83ba29aec0SGarrett Wollmanis specified as a decimal number, it may be followed by the letter
84ba29aec0SGarrett Wollman.Ql f
85ba29aec0SGarrett Wollmanor
86ba29aec0SGarrett Wollman.Ql p
87ba29aec0SGarrett Wollmanto indicate the following or preceding month of that number,
88ba29aec0SGarrett Wollmanrespectively.
890cb2e609SWolfgang Helbig.It Fl o
90ba29aec0SGarrett WollmanDisplay date of Orthodox Easter (Greek and Russian
910cb2e609SWolfgang HelbigOrthodox Churches).
920cb2e609SWolfgang Helbig.It Fl p
93cb0f03a1SWolfgang HelbigPrint the country codes and switching days from Julian to Gregorian
940cb2e609SWolfgang HelbigCalendar as they are assumed by
950cb2e609SWolfgang Helbig.Nm ncal .
96cde26ed2SWolfgang HelbigThe country code as determined from the local environment is marked
97cde26ed2SWolfgang Helbigwith an asterisk.
98a99e4564SPhilippe Charnier.It Fl s Ar country_code
990cb2e609SWolfgang HelbigAssume the switch from Julian to Gregorian Calendar at the date
1000cb2e609SWolfgang Helbigassociated with the
101a99e4564SPhilippe Charnier.Ar country_code .
1020cb2e609SWolfgang HelbigIf not specified,
1030cb2e609SWolfgang Helbig.Nm ncal
104cde26ed2SWolfgang Helbigtries to guess the switch date from the local environment or
1056a3e8b0aSRuslan Ermilovfalls back to September 2, 1752.
1066a3e8b0aSRuslan ErmilovThis was when Great
107cde26ed2SWolfgang HelbigBritain and her colonies switched to the Gregorian Calendar.
1080cb2e609SWolfgang Helbig.It Fl w
109cb0f03a1SWolfgang HelbigPrint the number of the week below each week column.
1100cb2e609SWolfgang Helbig.It Fl y
1110c4cafeaSGarrett WollmanDisplay a calendar for the specified year.
1120851fbdfSEdwin Groothuis.It Fl b
1130851fbdfSEdwin GroothuisSwitch to backwards compatibility mode (for debugging).
1140851fbdfSEdwin Groothuis.It Fl d Ar yyyy-mm-dd
1150851fbdfSEdwin GroothuisUse
1160851fbdfSEdwin Groothuis.Ar yyyy-mm-dd
1170851fbdfSEdwin Groothuisas the current date (for debugging of highlighting).
1180851fbdfSEdwin Groothuis.It Fl 3
1190851fbdfSEdwin GroothuisDisplay the previous, current and next month surrounding today.
1200851fbdfSEdwin Groothuis.It Fl A Ar number
1210851fbdfSEdwin GroothuisDisplay the
1220851fbdfSEdwin Groothuis.Ar number
1230851fbdfSEdwin Groothuisof months after the current month.
1240851fbdfSEdwin Groothuis.It Fl B Ar number
1250851fbdfSEdwin GroothuisDisplay the
1260851fbdfSEdwin Groothuis.Ar number
1270851fbdfSEdwin Groothuisof months before the current month.
1280cb2e609SWolfgang Helbig.El
1290cb2e609SWolfgang Helbig.Pp
130ba29aec0SGarrett WollmanA single parameter specifies the year (1\(en9999) to be displayed;
1310cb2e609SWolfgang Helbignote the year must be fully specified:
1320cb2e609SWolfgang Helbig.Dq Li cal 89
1330cb2e609SWolfgang Helbigwill
1340cb2e609SWolfgang Helbig.Em not
1350851fbdfSEdwin Groothuisdisplay a calendar for 1989.  Two parameters denote the month and
1360851fbdfSEdwin Groothuisyear; the month is either a number between 1 and 12, or a full or
1370851fbdfSEdwin Groothuisabbreviated name as specified by the current locale.  Month and
1380851fbdfSEdwin Groothuisyear default to those of the current system clock and time zone (so
1390c4cafeaSGarrett Wollman.Dq Li cal -m 8
1400851fbdfSEdwin Groothuiswill display a calendar for the month of August in the current
1410851fbdfSEdwin Groothuisyear).
1420cb2e609SWolfgang Helbig.Pp
143ba29aec0SGarrett WollmanA year starts on January 1.
1440cb2e609SWolfgang Helbig.Sh SEE ALSO
1450cb2e609SWolfgang Helbig.Xr calendar 3 ,
1460cb2e609SWolfgang Helbig.Xr strftime 3
1470cb2e609SWolfgang Helbig.Sh HISTORY
1480cb2e609SWolfgang HelbigA
1498fe908efSRuslan Ermilov.Nm
1500cb2e609SWolfgang Helbigcommand appeared in
1511b2edc04STim J. Robbins.At v5 .
1520cb2e609SWolfgang HelbigThe
1530cb2e609SWolfgang Helbig.Nm ncal
154f24a941bSPoul-Henning Kampcommand appeared in
155f24a941bSPoul-Henning Kamp.Fx 2.2.6 .
156306005e7SPhilippe Charnier.Sh AUTHORS
157f24a941bSPoul-Henning KampThe
158f24a941bSPoul-Henning Kamp.Nm ncal
159f24a941bSPoul-Henning Kampcommand and manual were written by
160306005e7SPhilippe Charnier.An Wolfgang Helbig Aq helbig@FreeBSD.org .
161cde26ed2SWolfgang Helbig.Sh BUGS
1620851fbdfSEdwin GroothuisThe assignment of Julian\(enGregorian switching dates to country
1630851fbdfSEdwin Groothuiscodes is historically naive for many countries.
164