ayush2917 commited on
Commit
535dc0d
·
verified ·
1 Parent(s): 881b719

Update countdown.py

Browse files
Files changed (1) hide show
  1. countdown.py +5 -4
countdown.py CHANGED
@@ -1,7 +1,8 @@
1
  from datetime import datetime
2
 
3
  def get_countdown():
4
- birthday = datetime(2025, 4, 19)
5
- today = datetime.now()
6
- days_left = (birthday - today).days
7
- return max(0, days_left)
 
 
1
  from datetime import datetime
2
 
3
  def get_countdown():
4
+ """Calculate the number of days until Manavi's birthday on April 19, 2025."""
5
+ target_date = datetime(2025, 4, 19).date() # Ignore time component
6
+ today = datetime.now().date() # Ignore time component
7
+ days_left = (target_date - today).days
8
+ return max(0, days_left) # Ensure days_left is not negative