Dearsawan commited on
Commit
7a0053b
·
verified ·
1 Parent(s): 42fc4a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -26,10 +26,6 @@ def age_calculator():
26
  # Date input from the user
27
  birthdate = st.date_input("Select your birthdate", min_value=datetime(1900, 1, 1), max_value=datetime.today())
28
 
29
- # Convert the date to a datetime object for easier calculations
30
- if isinstance(birthdate, datetime):
31
- birthdate = birthdate.date() # Make sure it's a datetime.date object
32
-
33
  # Calculate the age when the button is pressed
34
  if st.button("Calculate Age"):
35
  if birthdate:
 
26
  # Date input from the user
27
  birthdate = st.date_input("Select your birthdate", min_value=datetime(1900, 1, 1), max_value=datetime.today())
28
 
 
 
 
 
29
  # Calculate the age when the button is pressed
30
  if st.button("Calculate Age"):
31
  if birthdate: