A sleek and modern age calculator built with HTML, CSS, and JavaScript that not only calculates your age but presents it with style and animations!
- 🎯 Precise age calculation
- 🎨 Modern glass effect design
- 🌈 Smooth animations and transitions
- 📱 Fully responsive layout
- ⚡ Real-time input validation
- 🔢 Detailed age breakdown (years, months, days, hours, minutes, seconds)
- 🎉 Interactive UI elements
<!-- Core Components -->
- Calculator Container
- Header with Icon
- Date Input Section
- Calculate Button
- Result Popup
- Age Display
- Age Details (years, months, days, hours, minutes, seconds)
- Close Button/* Key Styling Elements */
- Glass-morphism effect using backdrop-filter
+ Glass effect using backdrop-filter
- Gradient backgrounds and borders
- Custom input styling
- Smooth transitions and animations
- Responsive design
- Icon integrations
- Modern typography with Google Fonts/* Core Features */
- Date validation and formatting
- Age calculation logic
- Real-time updates
- Interactive animations
- Error handling
- Input masking- Clone the repository
git clone https://github.com/shivshankarpandey/age-calculater.git- Navigate to project
cd age-calculator- Open in browser
- Open
index.htmlin your preferred browser - Start calculating ages!
- Enter your date of birth in MM/DD/YYYY format
- Click the "Calculate Age" button
- View your age breakdown in the stylish popup
- Close using the 'X' button when done
-
Colours Scheme:
- Primary: Gold (#FFD700)
- Secondary: Orange (#FFA500)
- Background: Dark with blur effect
- Text: White with subtle shadows
-
Animations:
- Smooth transitions
- Hover effects
- Popup animations
- Button interactions
-
Typography:
- Montserrat for headings
- Quicksand for body text
// Core calculation
ageYears = today.getFullYear() - birthDate.getFullYear();
ageMonths = today.getMonth() - birthDate.getMonth();
ageDays = today.getDate() - birthDate.getDate();
// Adjustments for accurate calculations
if (ageDays < 0) {
ageMonths--;
ageDays += daysInMonth;
}
if (ageMonths < 0) {
ageYears--;
ageMonths += 12;
}.container {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 2px solid rgba(255, 255, 255, 0.2);
}- Mobile-first approach
- Flexible layouts
- Adaptive typography
- Touch-friendly interface
Feel free to contribute to this project:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Font Awesome for icons
- Google Fonts for typography
- Background image from [age calculater .png]
Made with ❤️ by [Shivshankar pandey]: https://github.com/shivshankarpandey/age-calculater.git
