Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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:
|