Home | History | Annotate | only in /src/usr.bin/cal
History log of /src/usr.bin/cal
RevisionDateAuthorComments
 1.5 03-Feb-2010  roy Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@
 1.4 05-Jun-2003  atatat Add -h to cal, which makes it highlight the current date, if it's
present in the displayed calender. It uses libtermcap to discover the
proper sequences to turn on bold, or uses overstriking if output is
not to a terminal. If you use two -h options with terminal output,
the date is presented in reverse video instead of bold.

Next we'll have to make the Gregorian gap vary with TZ settings, since
the current method (do it only for September 1752) is decidely
Anglo-centric. ;-P
 1.3 26-Mar-1995  glass merged with 4.4Lite
 1.2 31-Jul-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 26-Mar-1995  glass import 4.4Lite version
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.23 29-May-2018  wiz Remove superfluous Pp.
 1.22 29-May-2018  kamil After Todd C. Miller[0] - cal(1) first appeared in Version 1 AT&T UNIX[1][2].

[0] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/cal/cal.1?rev=1.28&content-type=text/x-cvsweb-markup
[1] https://www.bell-labs.com/usr/dmr/www/1stEdman.html
[2] https://www.bell-labs.com/usr/dmr/www/man61.pdf

Patch submitted by @rjc via https://github.com/NetBSD/src/pull/3
 1.21 08-Jan-2015  christos branches: 1.21.14;
Provide -C == -A + -B like fgrep, from Anon Ymous
 1.20 24-Dec-2007  wiz Sort options.
 1.19 21-Dec-2007  joerg Document ISO format "cal 2007-12", leave "cal 2007/12" undocumented
intentionally.
 1.18 07-Aug-2003  agc branches: 1.18.24;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.17 24-Jul-2003  atatat Reform the Gregorian Reform. This means that the previously hard
coded meaning of 1752/09/03 is only a default, and that everything is
now calculated dynamically.

You can now use -R reform-spec to specify an alternate reform. Read
the fine (new) man page for details on this. There is also a new -r
option which will make cal print the month (or year, if -y is also
given) in which the Gregorian Reform started. I say started only
because if you apply the reform at 9999/1/22, a chunk of January is
knocked out, February and March are missing entirely, and April starts
on the 5th. The use of -r with -y does pretty much what you'd expect.

Also, implement -d day-of-week so that you can tell cal to start the
week on something other that a Sunday. This addresses PR bin/8539 at
long last.
 1.16 30-Jun-2003  wiz Fixes to make these man page look nice with groff-1.19.
 1.15 05-Jun-2003  atatat Add -h to cal, which makes it highlight the current date, if it's
present in the displayed calender. It uses libtermcap to discover the
proper sequences to turn on bold, or uses overstriking if output is
not to a terminal. If you use two -h options with terminal output,
the date is presented in reverse video instead of bold.

Next we'll have to make the Gregorian gap vary with TZ settings, since
the current method (do it only for September 1752) is decidely
Anglo-centric. ;-P
 1.14 11-Feb-2003  yamt use Ar for option arguments.
 1.13 25-Oct-2002  wiz ispell. Use more markup.
 1.12 25-Oct-2002  yamt - add -A and -B option.
- change -3 to a synonym of "-A1 -B1".
(to make compatible other implementations)
- eliminate duplicated codes.
- fix crashes for -3.
 1.11 23-Jun-2002  wiz Use a slightly more standard section header.
 1.10 22-Jun-2002  perry add -3 option (display three month range)
 1.9 01-Dec-2001  wiz Whitespace cleanup.
 1.8 03-Nov-1999  wennmach Fix a documentation bug in this man page: The Gregorian Reformation in Great
Britain and its colonies eliminated 11 days (not 10), following
September 2, 1752.

From "A.D. 1751. Anno vicesimo quarto GEORGII II. CAP. XXIII.
An Act for Regulating the Commencement of the Year; and for
Correcting the Calendar now in Use.":

"... and that the natural Day next immediately following the said 2nd Day of
*September* [1752], shall be called, reckoned and accounted to be the 14th
Day of *September*, omitting for that Time only the 11 intermediate nominal
Days of the common Calendar;

and that the several natural Days, which shall follow and succeed next after
the said 14th Day of *September*, shall be respectively called, reckoned and
numbered forwards in numerical Order from the said 14th Day of *September*,
according to the Order and Succession of Days now used in the present
Calendar; "

Added a caution note on using cal for very old dates.

Problem mentionned in PR 5215 by John Franklin (franklin@bev.net).

Thanks to Perry Metzger for his comments and for reviewing this man page.
 1.7 18-Oct-1997  lukem branches: 1.7.6;
WARNSify, fix .Nm usage
 1.6 02-Sep-1995  jtc Sync with 4.4lite2
 1.5 26-Mar-1995  glass merged with 4.4Lite
 1.4 03-Nov-1994  jtc Misc manpages fixes (PR #551)
 1.3 30-Nov-1993  jtc Use ".At v6" macro instead of spelling out "Version 6 AT&T UNIX".
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Sep-1995  jtc imported from 44lite2
 1.1.1.2 26-Mar-1995  glass import 4.4Lite version
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.24.1 09-Jan-2008  matt sync with HEAD
 1.21.14.1 25-Jun-2018  pgoyette Sync with HEAD
 1.30 29-Jun-2020  kim Use two-letter weekday abbreviations in the heading

This matches output from ncal (a.k.a. cal) as found in FreeBSD and
bsdmainutils. (Why had "T" been found more ambiguous than "S" already?)
 1.29 16-Jun-2015  christos branches: 1.29.18;
fix some error handling.
 1.28 08-Jan-2015  christos Provide -C == -A + -B like fgrep, from Anon Ymous
 1.27 29-Aug-2011  joerg static + __dead
 1.26 03-Feb-2010  roy Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@
 1.25 11-Apr-2009  lukem fix WARNS=4 issues
 1.24 21-Jul-2008  lukem branches: 1.24.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.23 01-Jan-2008  dholland branches: 1.23.6;
Don't allow negative args for the -A and -B options, because they
lead to SIGSEGV in the output formatting code.
Fixes PR 37657 from Jeffrey E. Bedard.
 1.22 24-Dec-2007  wiz Sort options.
 1.21 19-Dec-2007  joerg Also recognize year-month as suggested by Alan Barrett.
 1.20 19-Dec-2007  joerg Make syntax checking more strict and recognize year/month.
One Finish and German developer agree that month year is a stupid
order, the French and British guys disagree and the only natural
choice left is to make it understand ISO style.
 1.19 02-Jun-2005  lukem branches: 1.19.12;
appease gcc -Wuninitialized
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.17 24-Jul-2003  atatat Reform the Gregorian Reform. This means that the previously hard
coded meaning of 1752/09/03 is only a default, and that everything is
now calculated dynamically.

You can now use -R reform-spec to specify an alternate reform. Read
the fine (new) man page for details on this. There is also a new -r
option which will make cal print the month (or year, if -y is also
given) in which the Gregorian Reform started. I say started only
because if you apply the reform at 9999/1/22, a chunk of January is
knocked out, February and March are missing entirely, and April starts
on the 5th. The use of -r with -y does pretty much what you'd expect.

Also, implement -d day-of-week so that you can tell cal to start the
week on something other that a Sunday. This addresses PR bin/8539 at
long last.
 1.16 22-Jul-2003  yamt fix garbages printed with -h option.
- always clear linebuffer.
- don't use an uninitialized variable.
 1.15 05-Jun-2003  atatat Add -h to cal, which makes it highlight the current date, if it's
present in the displayed calender. It uses libtermcap to discover the
proper sequences to turn on bold, or uses overstriking if output is
not to a terminal. If you use two -h options with terminal output,
the date is presented in reverse video instead of bold.

Next we'll have to make the Gregorian gap vary with TZ settings, since
the current method (do it only for September 1752) is decidely
Anglo-centric. ;-P
 1.14 25-Oct-2002  yamt - add -A and -B option.
- change -3 to a synonym of "-A1 -B1".
(to make compatible other implementations)
- eliminate duplicated codes.
- fix crashes for -3.
 1.13 22-Jun-2002  perry add -3 option (display three month range)
 1.12 21-Jun-2002  perry ansi prototypes, un__P, and some KNF
 1.11 06-Nov-1998  christos char -> unsigned char
 1.10 28-Jul-1998  mycroft __AUDIT__ cleanup.
 1.9 17-Apr-1998  ws Fix leap_year calculation (1900 wasn't a leap year)
 1.8 04-Feb-1998  christos Don't hardcode 1900...
 1.7 18-Oct-1997  lukem branches: 1.7.2;
WARNSify, fix .Nm usage
 1.6 26-Mar-1995  glass merged with 4.4Lite
 1.5 16-Jan-1995  ws Minor fix for date of 3 Sep 1752
doesn't affect program due to usage of this constant
found by Frank Lancaster (fl@tools.de)
 1.4 24-Dec-1994  cgd pull in string.h
 1.3 25-Jan-1994  cgd make sure strings are null-terminated, from christos@deshaw.com
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 26-Mar-1995  glass import 4.4Lite version
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.2.1 24-Nov-1998  cgd pull up rev 1.9 from trunk (nathanw)
 1.19.12.1 09-Jan-2008  matt sync with HEAD
 1.23.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.29.18.1 30-Jun-2020  martin Pull up following revision(s) (requested by kim in ticket #977):

usr.bin/cal/cal.c: revision 1.30

Use two-letter weekday abbreviations in the heading

This matches output from ncal (a.k.a. cal) as found in FreeBSD and
bsdmainutils. (Why had "T" been found more ambiguous than "S" already?)

RSS XML Feed