Skip to content

Instantly share code, notes, and snippets.

@selimslab selimslab/

Created Nov 1, 2019
What would you like to do?
from datetime import datetime, timedelta
def get_date_of_x_days_ago(x: int):
return ( - timedelta(days=x)).isoformat()
def str_to_date(s: str):
return datetime.strptime(s, "%Y-%m-%d").date()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.