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 36cae11c25SEdwin Groothuis.Op Fl 3hjy 37cae11c25SEdwin Groothuis.Op Fl A Ar number 38cae11c25SEdwin Groothuis.Op Fl B Ar number 39536e6834SRuslan Ermilov.Oo 40536e6834SRuslan Ermilov.Op Ar month 41536e6834SRuslan Ermilov.Ar year 42536e6834SRuslan Ermilov.Oc 430c4cafeaSGarrett Wollman.Nm 44cae11c25SEdwin Groothuis.Op Fl 3hj 45cae11c25SEdwin Groothuis.Op Fl A Ar number 46cae11c25SEdwin Groothuis.Op Fl B Ar number 470c4cafeaSGarrett Wollman.Fl m Ar month 480c4cafeaSGarrett Wollman.Op Ar year 490cb2e609SWolfgang Helbig.Nm ncal 50cae11c25SEdwin Groothuis.Op Fl 3hjJpwy 51cae11c25SEdwin Groothuis.Op Fl A Ar number 52cae11c25SEdwin Groothuis.Op Fl B Ar number 53a99e4564SPhilippe Charnier.Op Fl s Ar country_code 54536e6834SRuslan Ermilov.Oo 55536e6834SRuslan Ermilov.Op Ar month 56536e6834SRuslan Ermilov.Ar year 57536e6834SRuslan Ermilov.Oc 580cb2e609SWolfgang Helbig.Nm ncal 59cae11c25SEdwin Groothuis.Op Fl 3hJeo 60cae11c25SEdwin Groothuis.Op Fl A Ar number 61cae11c25SEdwin Groothuis.Op Fl B Ar number 620cb2e609SWolfgang Helbig.Op Ar year 630cb2e609SWolfgang Helbig.Sh DESCRIPTION 64e8937ba0SPhilippe CharnierThe 65e8937ba0SPhilippe Charnier.Nm 66e8937ba0SPhilippe Charnierutility displays a simple calendar in traditional format and 670cb2e609SWolfgang Helbig.Nm ncal 68ba29aec0SGarrett Wollmanoffers an alternative layout, more options and the date of Easter. 690cb2e609SWolfgang HelbigThe new format is a little cramped but it makes a year fit 700cb2e609SWolfgang Helbigon a 25x80 terminal. 710cb2e609SWolfgang HelbigIf arguments are not specified, 720cb2e609SWolfgang Helbigthe current month is displayed. 73a99e4564SPhilippe Charnier.Pp 740cb2e609SWolfgang HelbigThe options are as follows: 75a99e4564SPhilippe Charnier.Bl -tag -width indent 767149aa01SRoman Divacky.It Fl h 777149aa01SRoman DivackyTurns off highlighting of today. 780cb2e609SWolfgang Helbig.It Fl J 790cb2e609SWolfgang HelbigDisplay Julian Calendar, if combined with the 800cb2e609SWolfgang Helbig.Fl e 81ba29aec0SGarrett Wollmanoption, display date of Easter according to the Julian Calendar. 820cb2e609SWolfgang Helbig.It Fl e 83ba29aec0SGarrett WollmanDisplay date of Easter (for western churches). 840cb2e609SWolfgang Helbig.It Fl j 85cb0f03a1SWolfgang HelbigDisplay Julian days (days one-based, numbered from January 1). 860c4cafeaSGarrett Wollman.It Fl m Ar month 870c4cafeaSGarrett WollmanDisplay the specified 880c4cafeaSGarrett Wollman.Ar month . 89ba29aec0SGarrett WollmanIf 90ba29aec0SGarrett Wollman.Ar month 91ba29aec0SGarrett Wollmanis specified as a decimal number, it may be followed by the letter 92ba29aec0SGarrett Wollman.Ql f 93ba29aec0SGarrett Wollmanor 94ba29aec0SGarrett Wollman.Ql p 95ba29aec0SGarrett Wollmanto indicate the following or preceding month of that number, 96ba29aec0SGarrett Wollmanrespectively. 970cb2e609SWolfgang Helbig.It Fl o 98ba29aec0SGarrett WollmanDisplay date of Orthodox Easter (Greek and Russian 990cb2e609SWolfgang HelbigOrthodox Churches). 1000cb2e609SWolfgang Helbig.It Fl p 101cb0f03a1SWolfgang HelbigPrint the country codes and switching days from Julian to Gregorian 1020cb2e609SWolfgang HelbigCalendar as they are assumed by 1030cb2e609SWolfgang Helbig.Nm ncal . 104cde26ed2SWolfgang HelbigThe country code as determined from the local environment is marked 105cde26ed2SWolfgang Helbigwith an asterisk. 106a99e4564SPhilippe Charnier.It Fl s Ar country_code 1070cb2e609SWolfgang HelbigAssume the switch from Julian to Gregorian Calendar at the date 1080cb2e609SWolfgang Helbigassociated with the 109a99e4564SPhilippe Charnier.Ar country_code . 1100cb2e609SWolfgang HelbigIf not specified, 1110cb2e609SWolfgang Helbig.Nm ncal 112cde26ed2SWolfgang Helbigtries to guess the switch date from the local environment or 1136a3e8b0aSRuslan Ermilovfalls back to September 2, 1752. 1146a3e8b0aSRuslan ErmilovThis was when Great 115cde26ed2SWolfgang HelbigBritain and her colonies switched to the Gregorian Calendar. 1160cb2e609SWolfgang Helbig.It Fl w 117cb0f03a1SWolfgang HelbigPrint the number of the week below each week column. 1180cb2e609SWolfgang Helbig.It Fl y 1190c4cafeaSGarrett WollmanDisplay a calendar for the specified year. 1200851fbdfSEdwin Groothuis.It Fl b 1210851fbdfSEdwin GroothuisSwitch to backwards compatibility mode (for debugging). 1220851fbdfSEdwin Groothuis.It Fl d Ar yyyy-mm-dd 1230851fbdfSEdwin GroothuisUse 1240851fbdfSEdwin Groothuis.Ar yyyy-mm-dd 1250851fbdfSEdwin Groothuisas the current date (for debugging of highlighting). 1260851fbdfSEdwin Groothuis.It Fl 3 1270851fbdfSEdwin GroothuisDisplay the previous, current and next month surrounding today. 1280851fbdfSEdwin Groothuis.It Fl A Ar number 1290851fbdfSEdwin GroothuisDisplay the 1300851fbdfSEdwin Groothuis.Ar number 1310851fbdfSEdwin Groothuisof months after the current month. 1320851fbdfSEdwin Groothuis.It Fl B Ar number 1330851fbdfSEdwin GroothuisDisplay the 1340851fbdfSEdwin Groothuis.Ar number 1350851fbdfSEdwin Groothuisof months before the current month. 1360cb2e609SWolfgang Helbig.El 1370cb2e609SWolfgang Helbig.Pp 138ba29aec0SGarrett WollmanA single parameter specifies the year (1\(en9999) to be displayed; 1390cb2e609SWolfgang Helbignote the year must be fully specified: 1400cb2e609SWolfgang Helbig.Dq Li cal 89 1410cb2e609SWolfgang Helbigwill 1420cb2e609SWolfgang Helbig.Em not 1430851fbdfSEdwin Groothuisdisplay a calendar for 1989. Two parameters denote the month and 1440851fbdfSEdwin Groothuisyear; the month is either a number between 1 and 12, or a full or 1450851fbdfSEdwin Groothuisabbreviated name as specified by the current locale. Month and 1460851fbdfSEdwin Groothuisyear default to those of the current system clock and time zone (so 1470c4cafeaSGarrett Wollman.Dq Li cal -m 8 1480851fbdfSEdwin Groothuiswill display a calendar for the month of August in the current 1490851fbdfSEdwin Groothuisyear). 1500cb2e609SWolfgang Helbig.Pp 151ba29aec0SGarrett WollmanA year starts on January 1. 1520cb2e609SWolfgang Helbig.Sh SEE ALSO 1530cb2e609SWolfgang Helbig.Xr calendar 3 , 1540cb2e609SWolfgang Helbig.Xr strftime 3 1550cb2e609SWolfgang Helbig.Sh HISTORY 1560cb2e609SWolfgang HelbigA 1578fe908efSRuslan Ermilov.Nm 1580cb2e609SWolfgang Helbigcommand appeared in 1591b2edc04STim J. Robbins.At v5 . 1600cb2e609SWolfgang HelbigThe 1610cb2e609SWolfgang Helbig.Nm ncal 162f24a941bSPoul-Henning Kampcommand appeared in 163f24a941bSPoul-Henning Kamp.Fx 2.2.6 . 164306005e7SPhilippe Charnier.Sh AUTHORS 165f24a941bSPoul-Henning KampThe 166f24a941bSPoul-Henning Kamp.Nm ncal 167f24a941bSPoul-Henning Kampcommand and manual were written by 168306005e7SPhilippe Charnier.An Wolfgang Helbig Aq helbig@FreeBSD.org . 169cde26ed2SWolfgang Helbig.Sh BUGS 1700851fbdfSEdwin GroothuisThe assignment of Julian\(enGregorian switching dates to country 1710851fbdfSEdwin Groothuiscodes is historically naive for many countries. 1721d0e1dacSEdwin Groothuis.Pp 1731d0e1dacSEdwin GroothuisNot all options are compatible and using them in different orders 1741d0e1dacSEdwin Groothuiswill give varying results. 175