cal

display a calendar for a month or year 

Command


SYNOPSIS

cal [month] [year]


DESCRIPTION

The cal command writes a human-readable calendar on the standard output.

With no arguments, cal displays a calendar for the current month of the current year. If one argument is given and it is numeric, cal interprets it as a year (for example, 1991); if a single argument is not numeric, cal interprets it as the name of a month, possibly abbreviated (for example, apr). When two arguments are given, cal assumes that the first argument is the month (either a number from 1 to 12 or a month name) and the second is the year.


ENVIRONMENT VARIABLES

TK_USE_CURRENT_LOCALE 

When set, this environment variable causes months and days of the week to be displayed as defined in the current locale. By default, PTC MKS Toolkit utilities display months and days of the week in English.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following:

— an invalid command line argument
— an invalid date
— a year outside the range 1 to 9999 A.D.


PORTABILITY

x/OPEN Portability Guide 4.0. All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


NOTES

Year numbers less than 100 refer to the early Christian era, not the current century. This command prints the Gregorian calendar, handling September 1752 correctly. Many cultures observe other calendars.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.4 Documentation Build 39.