Created
March 4, 2020 09:21
-
-
Save nim4n136/ac4fe4d40a0c50e4554ea474e0f7a1a6 to your computer and use it in GitHub Desktop.
Date min python
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
from datetime import date | |
from datetime import timedelta | |
def backdate(): | |
# Get today. | |
today = date.today() | |
# Subtract timedelta of 32 day. | |
yesterday = today - timedelta(days=32) | |
return yesterday | |
print(backdate()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment