Persian (Jalali, Shamsi, Solar Hijri) and lunar Hijri calendars for Dart and Flutter: conversion, date arithmetic, parsing, formatting with Persian names and digits; Iranian holidays.
https://nodets.com/jalali/ β// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 98/100 with only 6 stars
- Around since 2018 and still shipping
- 7 releases in the last 90 days
// how to help
// readme
jalali_date
Persian (Jalali, Shamsi) calendar for Dart.
It converts between Gregorian and Jalali dates in both directions, knows leap years and month lengths, does date arithmetic, parses and formats dates with Persian month and weekday names and Persian digits, and has everything a date picker needs: Saturday-first weeks, month anchors, day ranges, and bounds.
It reads dates written with a pattern or with month names, writes relative time (3 Ψ±ΩΨ² ΩΎΫΨ΄), dates in Persian words, and parts of the day (Ψ΅Ψ¨Ψ, ΨΉΨ΅Ψ±), counts whole months and years, and gives the moment of Nowruz (Ψ³Ψ§Ω ΨͺΨΩΫΩ).
The conversion is a port of jalaali-js, so century years and leap cycles are handled correctly.
It also gives the lunar Hijri date as Iranβs official calendar counts it, and writes and reads years in the Shahanshahi numbering when you ask for it.