Commit Graph

44 Commits

Author SHA1 Message Date
kim 6a5a56cef1 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?)
2020-06-29 14:01:14 +00:00
wiz b41d19c5ae Remove superfluous Pp. 2018-05-29 08:37:33 +00:00
kamil 954aa6d69d 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
2018-05-29 06:07:26 +00:00
christos ff53269704 fix some error handling. 2015-06-16 22:54:10 +00:00
christos 819d4545f4 Provide -C == -A + -B like fgrep, from Anon Ymous 2015-01-08 03:56:33 +00:00
joerg 49dbe234f7 static + __dead 2011-08-29 13:55:22 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
lukem 53d5aab9a2 fix WARNS=4 issues 2009-04-11 11:26:34 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
dholland 5e6732eb9c 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.
2008-01-01 17:45:01 +00:00
wiz 8caeef46da Sort options. 2007-12-24 13:56:00 +00:00
joerg 3fca1a6505 Document ISO format "cal 2007-12", leave "cal 2007/12" undocumented
intentionally.
2007-12-21 14:21:42 +00:00
joerg 358c956d05 Also recognize year-month as suggested by Alan Barrett. 2007-12-19 16:45:41 +00:00
joerg c98485db44 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.
2007-12-19 15:52:50 +00:00
lukem 658ed3362c appease gcc -Wuninitialized 2005-06-02 01:35:57 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
atatat cfda71101a 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.
2003-07-24 01:19:45 +00:00
yamt 808b43aeb1 fix garbages printed with -h option.
- always clear linebuffer.
- don't use an uninitialized variable.
2003-07-22 14:22:09 +00:00
wiz b93a29cdaa Fixes to make these man page look nice with groff-1.19. 2003-06-30 19:12:31 +00:00
atatat 85cee2b43a 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
2003-06-05 00:21:20 +00:00
yamt e913851a15 use Ar for option arguments. 2003-02-11 08:05:29 +00:00
wiz d94dd4600f ispell. Use more markup. 2002-10-25 20:10:21 +00:00
yamt c81873c76e - 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.
2002-10-25 20:06:56 +00:00
wiz bfb4c9fa11 Use a slightly more standard section header. 2002-06-23 00:22:56 +00:00
perry 037dfc0e18 add -3 option (display three month range) 2002-06-22 21:14:18 +00:00
perry 534ffc6dd8 ansi prototypes, un__P, and some KNF 2002-06-21 19:58:48 +00:00
wiz aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
wennmach 8d67a1ce88 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.
1999-11-03 14:32:25 +00:00
christos ac193186ef char -> unsigned char 1998-11-06 22:49:30 +00:00
mycroft 519d858510 __AUDIT__ cleanup. 1998-07-28 19:22:54 +00:00
ws b6a9340ab5 Fix leap_year calculation (1900 wasn't a leap year) 1998-04-17 14:01:56 +00:00
christos 7bc244d512 Don't hardcode 1900... 1998-02-04 15:17:49 +00:00
lukem b4d27c3a21 WARNSify, fix .Nm usage 1997-10-18 12:24:53 +00:00
jtc f8c5f00b42 Sync with 4.4lite2 1995-09-02 05:29:46 +00:00
glass 2db3772ce4 merged with 4.4Lite 1995-03-26 03:10:21 +00:00
ws 9bce9062d9 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)
1995-01-16 19:06:47 +00:00
cgd b8de9939be pull in string.h 1994-12-24 15:50:40 +00:00
jtc 3a08d567f4 Misc manpages fixes (PR #551) 1994-11-03 15:37:46 +00:00
cgd 20469574af make sure strings are null-terminated, from christos@deshaw.com 1994-01-25 00:49:35 +00:00
jtc 93a125034a Use ".At v6" macro instead of spelling out "Version 6 AT&T UNIX". 1993-11-30 00:11:45 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft dfb9caab49 Add RCS indentifiers. 1993-08-01 07:32:48 +00:00
mycroft 690cae8181 Add RCS indentifiers. 1993-07-31 15:17:49 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00