The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

cal - displays a calendar and the date of easter

SYNOPSIS

cal.pl [-jy?] [[month] year]

If no arguments are supplied, the current month will be displayed. If only the -j flag is passed as an argument, the current month will be displayed with julian day numbering (see below).

FLAGS

Below is a list of the flags that can be passed to cal.pl, and their meanings.

-j

displays the requested date using julian days for the numbers. That is, each day number is the day of the year for that day. Thus, in non leap-years, December 31 is day 365.

-y

displays the calendar for the current year. Note this is mutually exclusive with the -n flag above.

-?

displays information and usage instructions for the program. If this flag is included in any flag combination, it overrides all other flags.

MONTH/YEAR

If only one number is supplied, this number will be used as the year. If two numbers are supplied, the first will be the month, and the second will be the year. Valid months are 1 through 12, and valid years are 1 through 9999.

NOTE: dates must be fully defined. Entering a year of 99 means 99 AD, not 1999 AD.

DESCRIPTION

cal generates calendars from 1 AD through 9999 AD, in the following format.

March 1999 Su M Tu W Th F Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

It takes into account the conversion from the Julian Calendar to the Gregorian Calendar in September, 1752. Note that this was the date used in the UK and all of her colonies (including the U.S.). Thus, in September, 1752, there were only 19 days. Eleven days had to be removed from the calendar to make up for inaccuracies in the Julian Calendar. So, September 2, 1752 was followed by September 14, 1752 in the UK and all colonies, as shown below.

September 1752 Su M Tu W Th F Sa 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

The Julian calendar has a leap year every 4 years. The Gregorian calendar has a leap year based on the following: If the year is evenly divisible by 400, it is a leap year, else, if the year is evenly divisible by 4, and not evenly divisible by 100, it is a leap year. All other years are not leap years. There is some contention over whether 4 AD was a leap year or not. Not all the experts agree, as there was a counting error in the beginning of the Julian calendar with regards to leap years that had to be corrected, and thus some years that would normally have been leap years were not. This calendar assumes that 4 AD was indeed a leap year.

FURTHER READING

The calculations used in this calendar, as well as information on when the calendar was switched over, and the implications thereof, were obtained from information found at the following URL. If you would like to find out more about calendars, I highly suggest taking a look.

URL: http://www.pip.dknet.dk/~c-t/calendar.html

AUTHOR

Michael E. Schechter mschechter@earthlink.net

COPYRIGHT INFORMATION

This application is distributed as part of the Perl Power Tools. Feel free to copy, modify, delete, or whatever you would like with this file, under the information contained in the GNU GPL.