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 63531a1a4bSEdwin Groothuis.Nm ncal 64531a1a4bSEdwin Groothuis.Op Fl CN 65531a1a4bSEdwin Groothuis.Op Fl H Ar yyyy-mm-dd 66531a1a4bSEdwin Groothuis.Op Fl d Ar yyyy-mm 670cb2e609SWolfgang Helbig.Sh DESCRIPTION 68e8937ba0SPhilippe CharnierThe 69e8937ba0SPhilippe Charnier.Nm 70e8937ba0SPhilippe Charnierutility displays a simple calendar in traditional format and 710cb2e609SWolfgang Helbig.Nm ncal 72ba29aec0SGarrett Wollmanoffers an alternative layout, more options and the date of Easter. 730cb2e609SWolfgang HelbigThe new format is a little cramped but it makes a year fit 740cb2e609SWolfgang Helbigon a 25x80 terminal. 750cb2e609SWolfgang HelbigIf arguments are not specified, 760cb2e609SWolfgang Helbigthe current month is displayed. 77a99e4564SPhilippe Charnier.Pp 780cb2e609SWolfgang HelbigThe options are as follows: 79a99e4564SPhilippe Charnier.Bl -tag -width indent 807149aa01SRoman Divacky.It Fl h 817149aa01SRoman DivackyTurns off highlighting of today. 820cb2e609SWolfgang Helbig.It Fl J 830cb2e609SWolfgang HelbigDisplay Julian Calendar, if combined with the 840cb2e609SWolfgang Helbig.Fl e 85ba29aec0SGarrett Wollmanoption, display date of Easter according to the Julian Calendar. 860cb2e609SWolfgang Helbig.It Fl e 87ba29aec0SGarrett WollmanDisplay date of Easter (for western churches). 880cb2e609SWolfgang Helbig.It Fl j 89cb0f03a1SWolfgang HelbigDisplay Julian days (days one-based, numbered from January 1). 900c4cafeaSGarrett Wollman.It Fl m Ar month 910c4cafeaSGarrett WollmanDisplay the specified 920c4cafeaSGarrett Wollman.Ar month . 93ba29aec0SGarrett WollmanIf 94ba29aec0SGarrett Wollman.Ar month 95ba29aec0SGarrett Wollmanis specified as a decimal number, it may be followed by the letter 96ba29aec0SGarrett Wollman.Ql f 97ba29aec0SGarrett Wollmanor 98ba29aec0SGarrett Wollman.Ql p 99ba29aec0SGarrett Wollmanto indicate the following or preceding month of that number, 100ba29aec0SGarrett Wollmanrespectively. 1010cb2e609SWolfgang Helbig.It Fl o 102ba29aec0SGarrett WollmanDisplay date of Orthodox Easter (Greek and Russian 1030cb2e609SWolfgang HelbigOrthodox Churches). 1040cb2e609SWolfgang Helbig.It Fl p 105cb0f03a1SWolfgang HelbigPrint the country codes and switching days from Julian to Gregorian 1060cb2e609SWolfgang HelbigCalendar as they are assumed by 1070cb2e609SWolfgang Helbig.Nm ncal . 108cde26ed2SWolfgang HelbigThe country code as determined from the local environment is marked 109cde26ed2SWolfgang Helbigwith an asterisk. 110a99e4564SPhilippe Charnier.It Fl s Ar country_code 1110cb2e609SWolfgang HelbigAssume the switch from Julian to Gregorian Calendar at the date 1120cb2e609SWolfgang Helbigassociated with the 113a99e4564SPhilippe Charnier.Ar country_code . 1140cb2e609SWolfgang HelbigIf not specified, 1150cb2e609SWolfgang Helbig.Nm ncal 116cde26ed2SWolfgang Helbigtries to guess the switch date from the local environment or 1176a3e8b0aSRuslan Ermilovfalls back to September 2, 1752. 1186a3e8b0aSRuslan ErmilovThis was when Great 119cde26ed2SWolfgang HelbigBritain and her colonies switched to the Gregorian Calendar. 1200cb2e609SWolfgang Helbig.It Fl w 121cb0f03a1SWolfgang HelbigPrint the number of the week below each week column. 1220cb2e609SWolfgang Helbig.It Fl y 1230c4cafeaSGarrett WollmanDisplay a calendar for the specified year. 1240851fbdfSEdwin Groothuis.It Fl 3 1250851fbdfSEdwin GroothuisDisplay the previous, current and next month surrounding today. 1260851fbdfSEdwin Groothuis.It Fl A Ar number 1270851fbdfSEdwin GroothuisDisplay the 1280851fbdfSEdwin Groothuis.Ar number 1290851fbdfSEdwin Groothuisof months after the current month. 1300851fbdfSEdwin Groothuis.It Fl B Ar number 1310851fbdfSEdwin GroothuisDisplay the 1320851fbdfSEdwin Groothuis.Ar number 1330851fbdfSEdwin Groothuisof months before the current month. 134531a1a4bSEdwin Groothuis.It Fl C 135531a1a4bSEdwin GroothuisSwitch to 136531a1a4bSEdwin Groothuis.Nm cal 137531a1a4bSEdwin Groothuismode. 138531a1a4bSEdwin Groothuis.It Fl N 139531a1a4bSEdwin GroothuisSwitch to 140531a1a4bSEdwin Groothuis.Nm ncal 141531a1a4bSEdwin Groothuismode. 1424af997a8SEdwin Groothuis.It Fl d Ar yyyy-mm 1434af997a8SEdwin GroothuisUse 1444af997a8SEdwin Groothuis.Ar yyyy-mm 1454af997a8SEdwin Groothuisas the current date (for debugging of date selection). 1464af997a8SEdwin Groothuis.It Fl H Ar yyyy-mm-dd 1474af997a8SEdwin GroothuisUse 1484af997a8SEdwin Groothuis.Ar yyyy-mm-dd 1494af997a8SEdwin Groothuisas the current date (for debugging of highlighting). 1500cb2e609SWolfgang Helbig.El 1510cb2e609SWolfgang Helbig.Pp 152ba29aec0SGarrett WollmanA single parameter specifies the year (1\(en9999) to be displayed; 1530cb2e609SWolfgang Helbignote the year must be fully specified: 1540cb2e609SWolfgang Helbig.Dq Li cal 89 1550cb2e609SWolfgang Helbigwill 1560cb2e609SWolfgang Helbig.Em not 1570851fbdfSEdwin Groothuisdisplay a calendar for 1989. Two parameters denote the month and 1580851fbdfSEdwin Groothuisyear; the month is either a number between 1 and 12, or a full or 1590851fbdfSEdwin Groothuisabbreviated name as specified by the current locale. Month and 1600851fbdfSEdwin Groothuisyear default to those of the current system clock and time zone (so 1610c4cafeaSGarrett Wollman.Dq Li cal -m 8 1620851fbdfSEdwin Groothuiswill display a calendar for the month of August in the current 1630851fbdfSEdwin Groothuisyear). 1640cb2e609SWolfgang Helbig.Pp 1654af997a8SEdwin GroothuisNot all options can be used together. For example 1664af997a8SEdwin Groothuis.Dq Li -3 -A 2 -B 3 -y -m 7 1674af997a8SEdwin Groothuiswould mean: 1684af997a8SEdwin Groothuisshow me the three months around the seventh month, three before 1694af997a8SEdwin Groothuisthat, two after that and the whole year. 1704af997a8SEdwin Groothuis.Nm ncal 1714af997a8SEdwin Groothuiswill warn about these combinations. 1724af997a8SEdwin Groothuis.Pp 173ba29aec0SGarrett WollmanA year starts on January 1. 174*f379d691SEdwin Groothuis.P 175*f379d691SEdwin GroothuisHighlighting of dates is disabled if stdout is not a tty. 1760cb2e609SWolfgang Helbig.Sh SEE ALSO 1770cb2e609SWolfgang Helbig.Xr calendar 3 , 1780cb2e609SWolfgang Helbig.Xr strftime 3 1790cb2e609SWolfgang Helbig.Sh HISTORY 1800cb2e609SWolfgang HelbigA 1818fe908efSRuslan Ermilov.Nm 1820cb2e609SWolfgang Helbigcommand appeared in 1831b2edc04STim J. Robbins.At v5 . 1840cb2e609SWolfgang HelbigThe 1850cb2e609SWolfgang Helbig.Nm ncal 186f24a941bSPoul-Henning Kampcommand appeared in 187f24a941bSPoul-Henning Kamp.Fx 2.2.6 . 188306005e7SPhilippe Charnier.Sh AUTHORS 189f24a941bSPoul-Henning KampThe 190f24a941bSPoul-Henning Kamp.Nm ncal 191f24a941bSPoul-Henning Kampcommand and manual were written by 192306005e7SPhilippe Charnier.An Wolfgang Helbig Aq helbig@FreeBSD.org . 193cde26ed2SWolfgang Helbig.Sh BUGS 1940851fbdfSEdwin GroothuisThe assignment of Julian\(enGregorian switching dates to country 1950851fbdfSEdwin Groothuiscodes is historically naive for many countries. 1961d0e1dacSEdwin Groothuis.Pp 1971d0e1dacSEdwin GroothuisNot all options are compatible and using them in different orders 1981d0e1dacSEdwin Groothuiswill give varying results. 199