diff --git a/Python/days_until.py b/Python/days_until.py new file mode 100644 index 0000000..804918e --- /dev/null +++ b/Python/days_until.py @@ -0,0 +1,4 @@ +from datetime import datetime +def days_until(date_str): + future_date = datetime.strptime(date_str, '%Y-%m-%d') + return (future_date - datetime.now()).days