To add a Hijri calendar to a mobile app, choose the Umm al-Qura calendar system, store every date in Gregorian or UTC form, convert dates only for display, and use a date picker that understands Hijri months. iOS and Android include native calendar APIs. Flutter needs a package. Most bugs come from storing Hijri strings and from ignoring edge cases, not from the conversion itself.
This guide walks through the decisions, the platform options, the common mistakes, and a testing checklist.
The Hijri calendar is a lunar calendar with 12 months of 29 or 30 days. Its year is about 354 or 355 days, roughly 11 days shorter than the Gregorian year. Umm al-Qura is the Hijri calendar Saudi Arabia uses for official and administrative purposes.
The twelve months are Muharram, Safar, Rabi al-Awwal, Rabi al-Thani, Jumada al-Awwal, Jumada al-Thani, Rajab, Shaban, Ramadan, Shawwal, Dhu al-Qadah, and Dhu al-Hijjah. Your app needs correct Arabic and English labels for each one.
Many Saudi users read dates in both systems. Government forms, official documents, school calendars, and contracts often show Hijri and Gregorian dates side by side. An app that shows only Gregorian dates can feel incomplete in these settings.
Hijri dates matter most in these app types:
If you are building for the Kingdom, Hijri support belongs in discovery, alongside Arabic layout and numerals. We cover those in our guide to Arabic app development and RTL design.
Settle these early. Each one changes your data model.
That last point matters for any app that shows religious events. Treat those dates as editable content, not as fixed calculations.
Follow this order to keep the work clean.
| Platform | Main approach | Notes |
| iOS (Swift) | Use a calendar with the Umm al-Qura identifier and a date formatter | Native support; set the locale to Arabic |
| Android (Kotlin) | Use Java time’s Hijrah date classes or the ICU Islamic calendar | Hijrah classes need API 26 or desugaring |
| Flutter | Use packages such as hijri, hijri_picker, or a Hijri-enabled date picker | Check each package’s Flutter version requirement |
| React Native | Use the JavaScript Intl API with an Islamic calendar option, or a community library | Test on real devices, since Intl support varies |
| Web, Ionic, Angular | Use a Hijri-Gregorian date picker component | Choose the default calendar type in code |
Not sure which route fits your stack? Our mobile app development team can compare native tools and packages for your project before you build.
Swift lets you create a calendar and attach it to a formatter:
var hijri = Calendar(identifier: .islamicUmmAlQura)
hijri.locale = Locale(identifier: “ar_SA”)
let formatter = DateFormatter()
formatter.calendar = hijri
formatter.locale = Locale(identifier: “ar_SA”)
formatter.dateStyle = .long
let hijriText = formatter.string(from: Date())
On Android, Java time includes a Hijrah date class:
val hijriDate = HijrahDate.from(LocalDate.now())
val text = hijriDate.format(
DateTimeFormatter.ofPattern(“d MMMM yyyy”, Locale(“ar”, “SA”))
)
Check your minimum Android version before you choose this route. If you support older devices, enable desugaring or use the ICU Islamic calendar.
Flutter has several community options. The hijri_picker package, for example, lets Flutter’s built-in Material 3 date picker show Hijri dates. It needs Flutter 3.32 or newer. The material_drum_picker package offers a Hijri mode for date, time, and date-time pickers, and it states that its built-in lunar calendar is Umm al-Qura.
Packages change fast. Before you commit, check the latest version, the Flutter requirement, and open issues. One picker package even documents a crash when you use a year picker with a non-Gregorian calendar and skip a required setting. Small details like this decide whether a package fits your project.
If you work in Flutter, you can often reuse the same Hijri logic on both iOS and Android. That can save time compared with building separate native pickers.
The calendar touches more than the date picker. Think through each feature that uses dates.
Here is the flow in plain terms. A user picks a Hijri date in the picker. The app converts it to a UTC timestamp and saves it. Later, the app converts that same timestamp back for display. One stored value can appear as Hijri on one screen and Gregorian on another, with no data conflicts.
A calendar that is technically correct can still confuse people. Use these design rules:
Working on Saudi projects shapes these choices. Our app development in Saudi Arabia team plans date formats, numerals, and Arabic UX in discovery, not after design is done.
Run these checks before launch.
Keep a small set of reference dates from an official source. Run them in automated tests so a package update cannot silently change your results.
Hijri support is one piece of Arabic localization. Its effort depends on your platform, how many screens show dates, and whether you need a custom picker. Apps with many forms, bookings, or reports need more work than apps that show a single date.
To see how localization affects total budgets, read our guide to mobile app development cost in Saudi Arabia. Ask any vendor to list Hijri support as a separate line item in the estimate.
Learning how to add a Hijri calendar to a mobile app is mostly about discipline. Pick Umm al-Qura. Store standard timestamps. Convert only for display. Label calendars clearly. And treat religious dates as content you can edit, not constants you calculate once.
Done well, Hijri support makes your app feel built for Saudi users instead of adapted for them. Plan it early, test it with real dates, and keep it in your estimate from the start.
Yes, on native platforms. iOS includes calendar identifiers for Islamic calendars, and Android includes Hijrah date classes and ICU calendar tools. A library helps most when you need a ready-made Hijri date picker, especially in Flutter or React Native.
Use Umm al-Qura. It is the calendar Saudi Arabia uses for official and administrative purposes. Other Hijri calculations can differ by a day.
Different calendar variants calculate month starts differently. Also, religious observances such as Ramadan and Eid can depend on moon sighting, so they may not match a calculated calendar.
Store dates as Gregorian or UTC timestamps. Convert them to Hijri only when you display them. This keeps sorting, filtering, and time zones reliable.
Yes, through packages. Options include hijri_picker, which adapts Flutter’s Material 3 date picker, and a drum-style picker with a Hijri mode. Check each package’s Flutter version requirement and open issues before you choose.
Not always. They matter most in government, education, finance, HR, healthcare, and legal apps. For other apps, you can offer them as a user setting.
Technical details are based on platform documentation and public package pages for hijri_picker and material_drum_picker. Package versions and requirements change often, so confirm the latest details before you build.
We plan Hijri support, Arabic layouts, and Saudi data rules together. Talk to our team and we will scope the calendar work before you commit to a build.