1.3.1 Module-Level Functionality

The datetime module exports the following constants:

MINYEAR
The smallest year number allowed in a date or datetime object. MINYEAR is 1.

MAXYEAR
The largest year number allowed in a date or datetime object. MAXYEAR is 9999.

For Example:

>>> import web # Necessary to set up the paths so datetime can be imported
>>> import datetime
>>> datetime.MINYEAR
1
>>> datetime.MAXYEAR
9999