:py:mod:`gnome.utilities.inf_datetime` ====================================== .. py:module:: gnome.utilities.inf_datetime .. autoapi-nested-parse:: 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 Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: gnome.utilities.inf_datetime.InfTime gnome.utilities.inf_datetime.MinusInfTime gnome.utilities.inf_datetime.InfDateTime Attributes ~~~~~~~~~~ .. autoapisummary:: gnome.utilities.inf_datetime.min_datetime gnome.utilities.inf_datetime.max_datetime .. py:data:: min_datetime .. py:data:: max_datetime .. py:class:: InfTime Bases: :py:obj:`object` class representing time into infinity compares as greater than any datetime (or any other object..) .. py:method:: __str__() Return str(self). .. py:method:: __repr__() Return repr(self). .. py:method:: isoformat() .. py:method:: __lt__(other) an InfTime object is never less than any other object .. py:method:: __le__(other) an InfTime object is never less than or equal to any other object otehr than itself. .. py:method:: __eq__(other) an InfTime object is only equal to itself .. py:method:: __ne__(other) an InfTime object is only equal to itself .. py:method:: __gt__(other) an InfTime object is greater than eveything except another InfTime object .. py:method:: __ge__(other) an InfTime object is greater or equal to anything .. py:method:: __pos__() .. py:method:: __neg__() .. py:class:: MinusInfTime Bases: :py:obj:`object` class representing time from infinity in the past compares as less than any datetime (or any other object) .. py:method:: __str__() Return str(self). .. py:method:: __repr__() Return repr(self). .. py:method:: isoformat() .. py:method:: __lt__(other) an MinusInfTime object is always less than any other object except itself .. py:method:: __le__(other) an MinusInfTime object is always less than or equal to any other object. .. py:method:: __eq__(other) A MinusInfTime object is only equal to itself .. py:method:: __ne__(other) A MinusInfTime object is only equal to itself .. py:method:: __gt__(other) A MinusInfTime object is not greater than anything .. py:method:: __ge__(other) A Minus InfTime object is not greater than or equal to anything other than itself .. py:method:: __pos__() .. py:method:: __neg__() .. py:class:: InfDateTime Bases: :py:obj:`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 :param year: integer year of datetime object. year can also be "inf" or "-inf", and you'll get a special MinusInfTime or InfTime object. :param month: integer month of datetime :param day: integer day of datetime :param hour=0: integer hour of datetime :param minute=0: integer minute of datetime :param second=0: integer second of datetime :param microsecond=0: integer microsecond of datetime :param tzinfo=None: timzoneinfo object. See datetime docs for details.