Features
Today hero card
A prominent gradient card at the top displays:- Current Hijri date: Day, month name, and year
- Arabic month name: Displayed in Arabic script
- Gregorian date: Full date with day name
- “Today” label: Clear indication of current date
Calendar view
Interactive monthly calendar with: Header information:- Hijri month name and year (e.g., “Ramadan 1445”)
- Arabic month name in Amiri font
- Previous/next month navigation arrows
- Standard 7-day week layout
- Day numbers for both current and adjacent months
- Current day highlighted with primary color
- Selected day shows distinct background
- Event indicators as colored dots below dates
- Gold (yellow): Eid celebrations and holidays
- Green: Holy nights (Laylat al-Qadr, Shab-e-Barat)
- Purple: Fasting days (Ashura, Day of Arafah)
Event listings
Two event sections display: Events for selected date:- Shows all events occurring on the selected day
- Full event cards with details
- Arabic and English names
- Event descriptions and significance
- Next 5 upcoming Islamic events
- Chronological order by date
- Helps users plan ahead
- Shows distance in days/months
Islamic events database
The calendar includes pre-configured important events: Muharram (Month 1):- Islamic New Year (1st Muharram)
- Day of Ashura (10th Muharram) - Fasting recommended
- Mawlid an-Nabi (12th) - Birth of Prophet Muhammad (PBUH)
- Isra and Mi’raj (27th) - Night Journey and Ascension
- Shab-e-Barat (15th) - Night of Forgiveness
- Start of Ramadan (1st) - Beginning of fasting month
- Laylat al-Qadr (odd nights 21, 23, 25, 27, 29) - Night of Power
- 27th is the most commonly observed date
- All odd nights of last 10 days are possibilities
- Eid al-Fitr (1st) - Festival of Breaking the Fast
- Day of Arafah (9th) - Fasting recommended for non-pilgrims
- Eid al-Adha (10th) - Festival of Sacrifice
How users interact
Viewing the calendar
- Open calendar: Navigate to the Islamic calendar screen
- See today’s date: Review the hero card at the top
- Browse calendar: Scroll to see the monthly calendar grid
- Check events: Look for colored dots under dates
Navigating months
Change months:- Tap the left arrow for previous month
- Tap the right arrow for next month
- Month name updates to show Hijri month and year
- Calendar grid refreshes with new dates
- Tap the “Today” icon in the top app bar
- Calendar jumps to current date
- Today’s date is highlighted
- Events for today appear below
Selecting dates
- Tap any date in the calendar grid
- Selected date gets highlighted background
- Hero card updates to show selected date
- Events for that date appear in the events section
- Upcoming events refresh relative to selected date
Viewing event details
Event cards display:- Arabic name in Amiri font
- English name in title style
- Event type badge (Holiday, Fast, Night, Historical)
- Description of significance
- Additional notes when applicable
- Date information (Hijri and Gregorian)
Understanding event types
Holiday events:- Major Islamic celebrations
- Eid al-Fitr and Eid al-Adha
- Islamic New Year
- Marked with gold color
- Recommended or significant fasting days
- Day of Ashura, Day of Arafah
- Start of Ramadan
- Marked with purple color
- Special nights for worship
- Laylat al-Qadr, Shab-e-Barat
- Isra and Mi’raj
- Marked with green color
- Commemorative dates
- Mawlid an-Nabi
- Educational significance
- Marked with green color
Calendar legend
Three legend items explain the color coding:- Gold indicator: Eid (festivals and celebrations)
- Green indicator: Holy Night (special nights of worship)
- Purple indicator: Fasting (recommended fasting days)
Date calculations
Hijri date conversion
The app converts between Gregorian and Hijri dates:- Uses astronomical calculations
- Accounts for lunar month cycles
- Adjusts for regional differences
- Maintains accuracy across years
Month information
Each Hijri month has:- Number (1-12)
- English name (e.g., “Ramadan”)
- Arabic name in Unicode (e.g., “رمضان”)
- 29 or 30 days (lunar cycle)
Day state calculation
For each calendar day, the app determines:- Gregorian date
- Corresponding Hijri date
- Whether it’s today
- Whether it’s in the current month
- Any events occurring on that date
- Appropriate indicator color
Calendar month structure
The calendar displays: Current month days:- Full opacity and contrast
- Tappable and selectable
- Show event indicators
- Reduced opacity
- Fill out the calendar grid
- Maintain weekly structure
- Configurable (typically Sunday or Monday)
- Matches user’s locale preferences
- Consistent throughout calendar
Event card components
Each event card includes: Visual elements:- Rounded corners (12dp radius)
- Surface container background
- Adequate padding (16dp)
- Clear typography hierarchy
- Arabic name (large, Amiri font)
- English name (bold, title medium)
- Description (body medium)
- Notes (caption, if applicable)
- Hijri month and day
- Event type classification
- Holiday/fasting status flags
- Priority for display ordering
Technical implementation
Relevant source files:IslamicCalendarModels.kt- Data models and eventsIslamicCalendarScreen.kt- Calendar UICalendarViewModel.kt- State managementHijriDateCalculator.kt- Date conversion logic
HijriDate- Day, month, year representationIslamicEvent- Event details and metadataCalendarDay- Combined Gregorian and Hijri dateCalendarMonth- Complete month with eventsHijriMonth- Month enumeration with names
HOLIDAY- Major celebrationsFAST- Fasting daysNIGHT- Special worship nightsHISTORICAL- Commemorative dates