'\" te .\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH cal 1 "1 Feb 1995" "SunOS 5.11" "User Commands" .SH NAME cal \- display a calendar .SH SYNOPSIS .LP .nf \fBcal\fR [ [\fImonth\fR] \fIyear\fR] .fi .SH DESCRIPTION .sp .LP The \fBcal\fR utility writes a Gregorian calendar to standard output. If the \fIyear\fR operand is specified, a calendar for that year is written. If no operands are specified, a calendar for the current month is written. .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .mk .na \fB\fImonth\fR\fR .ad .RS 9n .rt Specify the month to be displayed, represented as a decimal integer from \fB1\fR (January) to \fB12\fR (December). The default is the current month. .RE .sp .ne 2 .mk .na \fB\fIyear\fR\fR .ad .RS 9n .rt Specify the year for which the calendar is displayed, represented as a decimal integer from \fB1\fR to \fB9999\fR. The default is the current year. .RE .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(5) for descriptions of the following environment variables that affect the execution of \fBcal\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .sp .ne 2 .mk .na \fB\fBTZ\fR\fR .ad .RS 6n .rt Determine the timezone used to calculate the value of the current month. .RE .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt Successful completion. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommitted _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBcalendar\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5) .SH NOTES .sp .LP An unusual calendar is printed for September 1752. That is the month 11 days were skipped to make up for lack of leap year adjustments. To see this calendar, type: .sp .in +2 .nf cal 9 1752 .fi .in -2 .sp .sp .LP The command \fBcal 83\fR refers to the year 83, not 1983. .sp .LP The year is always considered to start in January.