Range of valid years for calendar module?

Jack Crane jdcrane7 at yahoo.com
Mon Nov 15 10:44:00 EST 2004


Here's my calendar_for_specified_year.py. 

==============================================
# calendar_for_specified_year.py
# print any year's calendar from 1753 A.D. through at least 3999 A.D.

import calendar

calendar.setfirstweekday(6) # sets first day of week to Sunday

year = int(raw_input("Year for which to print calendar: "))

print "\n\n"
calendar.prcal(year)
===============================================

I've been trying to find out the range of years for which it will give me 
a valid calendar, and I've come up with "from 1753 to at least 3999". I 
used <http://www.timeanddate.com/calendar/index.html?year=4000&country=1> 
which seems to give calendars for years 1-3999. 

Does anyone know the actual range for the calendar module?

Thanks,

Jack



More information about the Python-list mailing list