Guide to Unix/Commands/Information

Implementation of unix command line calendar.


SyntaxEdit

cal [month] [year]


ExamplesEdit

  • 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

TrivaEdit

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
Last modified on 31 August 2009, at 21:10