Created
March 6, 2014 01:34
-
-
Save dstufft/9380471 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if dt.time(): | |
| counts[dt.date()] += 1 | |
| else: | |
| counts[dt.date() - timedelta(1)] += 1 |
Author
So:
- Yesterday at 3pm -> The day before yesterday += 1
- Today at midnight -> Today += 1
- Today at one minute past midnight -> yesterday += 1
WAT?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can I just say, wat wat wat.