Compare date with current date in python
Question: How do I compare a datetime object of this format

"Thu, 15 Jan 2015 06:35:37 GMT" with the current time ?


Answer: The easiest way is with the `dateutil` package. First install `dateutil` and
then:

    
    
    from dateutil.parser import parse
    parsed_time = parse("Thu, 15 Jan 2015 06:35:37 GMT")
    

Then you can do `from datetime import datetime` and get the current time with
`datetime.now()`, and you'll have two datetime objects you can compare however
you like.

If you can't use `dateutil`, you can still do it with `datetime.strptime()`,
but you'll have to specify the date string exactly which is quite fiddly.
Refer to the standard library documentation in that case.

