jalali_date v1.0.0

Migrating from jalali_date 0.1.x to 1.0

Breaking changes between jalali_date 0.1.x and 1.0: Dart 3, padded toString, final fields, validation and corrected conversions.

Migrating from 0.1.x

  • Dart 3 is required, and the package no longer depends on Flutter.
  • toString() pads the date, so 1396/1/1 is now 1396/01/01.
  • year, month, and day are final; create a new PersianDate instead of changing them.
  • PersianDate(year, month, day) throws ArgumentError for invalid dates.
  • The ld field, the monthsLength and kabiseMonthsLength tables, and the public greToJal() are gone. Use isLeapYear and monthLength instead.
  • Conversion results changed for some dates, because 0.1.x was wrong around Gregorian century years and Jalali leap cycles.
Edit this page on GitHub Last updated