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, so1396/1/1is now1396/01/01.year,month, anddayare final; create a newPersianDateinstead of changing them.PersianDate(year, month, day)throwsArgumentErrorfor invalid dates.- The
ldfield, themonthsLengthandkabiseMonthsLengthtables, and the publicgreToJal()are gone. UseisLeapYearandmonthLengthinstead. - Conversion results changed for some dates, because 0.1.x was wrong around Gregorian century years and Jalali leap cycles.