cal [ [ Month ] Year ]
The cal command displays a calendar of the specified year or month.
The Year parameter names the year for which you want a calendar. Since the cal command can display a calendar for any year from 1 through 9999, you must enter the full year rather than just the last two digits. The Month parameter identifies the month for which you want the calendar. It can be a number from 1 (indicating January) to 12 (indicating December). If you specify neither the Year nor the Month parameter, the cal command displays the current month. If you specify only one parameter, the cal command assumes the parameter is the Year parameter and displays the calendar for the indicated year.
Note: The cal command does not accept standard input.
The cal command uses the appropriate month and day names according to the locale settings. The "National Language Support Overview for Programming" in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs contains more information on the LANG, LC_TIME, LC_ALL, and TZ environment variables.
This command returns the following
exit values:
0 | Successful completion. |
>0 | An error occurred. |
cal 2 1994
cal 1994 | qprt
cal 84
/usr/bin/cal | Contains the cal command. |
The calendar command.
National Language Support Overview for System Management in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.
Input and Output Redirection Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices.
National Language Support Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.