BirthdayM / countdown.py
ayush2917's picture
Update countdown.py
535dc0d verified
raw
history blame contribute delete
372 Bytes
from datetime import datetime
def get_countdown():
"""Calculate the number of days until Manavi's birthday on April 19, 2025."""
target_date = datetime(2025, 4, 19).date() # Ignore time component
today = datetime.now().date() # Ignore time component
days_left = (target_date - today).days
return max(0, days_left) # Ensure days_left is not negative