A lightweight, open-source Hijri & Gregorian age calculator built with vanilla HTML, CSS, and JavaScript โ no frameworks, no dependencies, fully client-side.
This is a simplified, standalone version of the calculator engine that powers HisabAlUmr.com โ a free Arabic-language platform offering precise age, date, and Islamic calculator tools.
- ๐ Gregorian date of birth input with day/month/year dropdowns
- โณ Calculates exact age in years, months, days, weeks, hours, and minutes
- ๐ Countdown to next birthday
- ๐ RTL (right-to-left) Arabic UI out of the box
- ๐จ Clean, dark-themed, responsive single-file design
- โก Zero dependencies โ just open
index.htmlin a browser
Open index.html directly in your browser, or view it live here.
Most age calculators online only handle the Gregorian calendar. Many Arabic and Muslim-majority audiences also need accurate Hijri (Islamic) calendar conversions for birthdays, religious dates, and milestones.
This repo shares the core open-source logic. The full-featured version โ with accurate Hijri conversion, life-clock visualization, heartbeat/sleep-time estimates, shareable result cards, and more Islamic calculator tools (Zakat, pregnancy, sleep cycles) โ is available free at:
๐ hisabaleumr.com
Clone the repo and open the file โ that's it:
git clone https://github.com/your-username/age-calculator.git
cd age-calculator
open index.htmlNo build step, no npm install, no server required.
- HTML5
- CSS3 (custom properties / variables)
- Vanilla JavaScript (ES6+)
Pull requests are welcome! Ideas for contributions:
- Accurate Hijri calendar conversion algorithm
- i18n support (English / Urdu / Turkish)
- Unit tests for date edge cases (leap years, month boundaries)
MIT License โ free to use, modify, and distribute.
More Arabic calculator tools from the same project:
โญ If you find this useful, consider starring the repo!