What is the oldest time that can be represented in python?
Question: I have written a function comp(time1, time2) which will return true when time1
is lesser than time2. I have a scenario where time1 should always be lesser
than time2. I need time1 to have the least possible value(date). How to find
this time and how to form the corresponding object.


Answer: If using the [datetime](https://docs.python.org/2/library/datetime.html)
module, [date](https://docs.python.org/2/library/datetime.html#date-objects),
[time](https://docs.python.org/2/library/datetime.html#time-objects), and
[datetime](https://docs.python.org/2/library/datetime.html#datetime-objects)
objects all have a `min` and `max` attribute.

    
    
    >>> from datetime import date, time, datetime
    >>> date.min
    datetime.date(1, 1, 1)
    >>> date.max
    datetime.date(9999, 12, 31)
    >>> time.min
    datetime.time(0, 0)
    >>> time.max
    datetime.time(23, 59, 59, 999999)
    >>> datetime.min
    datetime.datetime(1, 1, 1, 0, 0)
    >>> datetime.max
    datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)
    

