Skip to content

Instantly share code, notes, and snippets.

@sleepless-se
Created January 18, 2018 15:04
Show Gist options
  • Save sleepless-se/8c0529a04a1a40276f240b936de2dab3 to your computer and use it in GitHub Desktop.
Save sleepless-se/8c0529a04a1a40276f240b936de2dab3 to your computer and use it in GitHub Desktop.
This method return minus days.
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