Created
January 18, 2018 15:04
-
-
Save sleepless-se/8c0529a04a1a40276f240b936de2dab3 to your computer and use it in GitHub Desktop.
This method return minus days.
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
import datetime | |
def getMinusDay(days): | |
today = datetime.date.today() | |
day = datetime.timedelta(days = days) | |
return today - day | |
print(getMinusDay(1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment