Created
June 24, 2015 13:29
-
-
Save DazWorrall/bbbc0cc2e6c3cad19660 to your computer and use it in GitHub Desktop.
py.ouy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python | |
Python 2.7.6 (default, Sep 9 2014, 15:04:36) | |
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from datetime import datetime | |
>>> last_christmas = datetime(2014,12,25) | |
>>> next_christmas = datetime(2015,12,25) | |
>>> today = datetime.today() | |
>>> (today - last_christmas).days | |
181 | |
>>> (next_christmas - today).days | |
183 | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment