import streamlit as st from datetime import date st.set_page_config(page_title="Age Calculator", page_icon="📅") st.title("📅 Age Calculator") st.write("Enter your birthdate to find your age in **years, months, and days**.") birth_date = st.date_input("Select your birthdate:", min_value=date(1900, 1, 1), max_value=date.today()) if birth_date: today = date.today() delta = today - birth_date years = delta.days // 365 months = (delta.days % 365) // 30 days = (delta.days % 365) % 30 st.subheader("🧮 Your Age is:") st.markdown(f"**{years}** years, **{months}** months, **{days}** days") st.markdown("---") st.caption("Made with ❤️ using Streamlit | Deployed on Hugging Face Spaces")