DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

cal(C)


cal -- print a calendar

Syntax

cal [ [ month ] year ]

Description

The cal command prints a Gregorian calendar for the specified year. If a month is also specified, a calendar for that month only is printed. If no arguments are specified, the current, previous, and following months are printed, along with the current date and time. The year must be a number between 1 and 9999; month must be a number between 1 and 12 or enough characters to specify a particular month. For example, ``May'' must be given in full to distinguish it from March, but ``S'' is sufficient to specify September. If only a month string is given, only that month of the current year is printed.

Exit values

cal returns the following values:

0
successful completion

>0
an error occurred

Limitations

Note that ``cal 84'' refers to the year 84, not 1984.

The calendar produced is the Gregorian calendar from September 14 1752 onward. Dates up to and including September 2 1752 use the Julian calendar. (England and her colonies switched from the Julian to the Gregorian calendar in September 1752, at which time eleven days were excised from the year. To see the result of this switch, try cal 9 1752.)

Standards conformance

cal is conformant with:

ISO/IEC DIS 9945-2:1992, Information technology - Portable Operating System Interface (POSIX) - Part 2: Shell and Utilities (IEEE Std 1003.2-1992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003