< Guide to Unix < Commands
Implementation of unix command line calendar.
Syntax
cal [month] [year]
Examples
- cal - prints calendar for current month
- cal -3 - prints out a 3 months (previous, current and next)
- cal -1 - prints current month (some implementations defaults to printing three months)
- cal 12 2006 - prints out calendar for December 2006
- cal 2006 - prints out calendar for the whole year 2006
- cal -s - set Sunday as a first day of week
- cal -m - set Monday as a first day of week
- cal -j - show the day-numbers (starting with January 1st as #1) of this month
Triva
In September 1752, England finally switched to the Gregorian-calendar (about 100 years later than the rest of Europe). As Unix was developed in "The Colonies", traces of this change can still be found in cal... try:
- cal 9 1752
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.