hijri
3.0.1, released 6 months ago by an unverified publisher
Convert between Hijri (Umm al‑Qura) and Gregorian dates with locale support.
What it does
Provides a HijriCalendar class to create, format, compare, and validate Hijri dates. Allows switching and adding locales for Arabic and English representations. Includes conversion methods to and from Gregorian DateTime objects.
AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display or compute Islamic (Hijri) dates in a Flutter/Dart app
- You require locale‑aware month and day names for Hijri calendar
Skip it when
- You need a full calendar UI widget (this package only provides data conversion)
- You require time‑zone aware or astronomical Hijri calculations beyond the Umm al‑Qura table
Strengths
- Simple API for common Hijri‑Gregorian conversions
- Supports adding custom locales and validates them
- Null‑safety and works on all Flutter platforms
Weaknesses
- No built‑in UI components for date picking
- Limited to the Umm al‑Qura calendar; not suitable for other Hijri calculation methods
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:hijri/hijri.dart';
void main(){
var today = HijriCalendar.now();
print('${today.hYear}/${today.hMonth}/${today.hDay}'); // e.g., 1439/9/14
var greg = HijriCalendar.fromDate(DateTime(2018,11,12));
print(greg.toString()); // 04/03/1440H
}Alternatives
Packages that do the same job and could replace hijri.
- jhijri
A Hijri and Gregorian date converter package for Flutter and Dart.
46Compare - general_datetime
Chronology library for Gregorian, Persian, Hebrew, Chinese and Umm al‑Qura calendars with Flutter date‑picker adapters.
64Compare - vnlunar
Convert between Vietnamese Lunar Calendar and Solar calendars.
61Compare - time_machine2
Comprehensive date and time library with support for timezones, calendars, cultures, and parsing.
59Compare
Works with
Packages commonly used together with hijri: ones it builds on, ones built on it, and its own family.