February 2006
Intermediate to advanced
648 pages
14h 53m
English
The datetime module provides a variety of classes for representing and manipulating dates and times. Date manipulation is a complex subject, and readers would be strongly advised to consult Python’s online documentation for an introductory background concerning the design of this module.
date(year, month, day)
Creates a new date object. year is an integer in the range datetime.MINYEAR to datetime.MAXYEAR. month is an integer in the range 1 to 12, and day is an integer in the range 1 to the number of days in the given month. The returned date object is immutable and has the attributes year, month, and day corresponding to the values of the supplied arguments.
date.today()A class method that returns a date object corresponding ...
Read now
Unlock full access