gnome.utilities.inf_datetime¶
special datetime objects with -inf and inf times
These are not real datetime objects – simply something that can be compared with one
Note: this is very liberal with comparisons – essentially an infinity time object is greater than anything, so no checking to see what you are comparing to..
Also special constructor for a real datetime that won’t allow values out of range for this application
Attributes¶
Classes¶
class representing time into infinity |
|
class representing time from infinity in the past |
|
A special datetime object: |
Module Contents¶
- gnome.utilities.inf_datetime.min_datetime¶
- gnome.utilities.inf_datetime.max_datetime¶
- class gnome.utilities.inf_datetime.InfTime¶
Bases:
object
class representing time into infinity
compares as greater than any datetime (or any other object..)
- isoformat()¶
- class gnome.utilities.inf_datetime.MinusInfTime¶
Bases:
object
class representing time from infinity in the past
compares as less than any datetime (or any other object)
- isoformat()¶
- class gnome.utilities.inf_datetime.InfDateTime¶
Bases:
datetime.datetime
A special datetime object:
It is either a regular datetime object, with the provision that it can’t be set outside the range given by the module variables:
min_datetime max_datetime
or a MinusInfTime or InfTime object.
create a new InfDateTime object
- Parameters:
year – integer year of datetime object. year can also be “inf” or “-inf”, and you’ll get a special MinusInfTime or InfTime object.
month – integer month of datetime
day – integer day of datetime
hour=0 – integer hour of datetime
minute=0 – integer minute of datetime
second=0 – integer second of datetime
microsecond=0 – integer microsecond of datetime
tzinfo=None – timzoneinfo object. See datetime docs for details.