utils/pdate_utils
library
Functions
-
addDaysToDate(Jalali date, int days)
→ Jalali
-
Returns a
Jalali with the added number of days and no time set.
-
addMonthsToMonthDate(Jalali monthDate, int monthsToAdd)
→ Jalali
-
Returns a
Jalali with the added number of months and truncates any day
and time information.
-
dateOnly(Jalali? date)
→ Jalali?
-
Returns a
Jalali with just the date of the original, but no time set.
-
datesOnly(JalaliRange range)
→ JalaliRange?
-
Returns a JalaliRange with the dates of the original without any times set.
-
firstDayOffset(int year, int month)
→ int
-
Computes the offset from the first day of the week that the first day of
the
month falls on.
-
formatDecimal(int number)
→ String
-
-
formatFullDate(Jalali? date)
→ String
-
-
formatMediumDate(Jalali date)
→ String
-
-
formatMonthYear(Jalali date)
→ String
-
-
formatRangeEndDate(MaterialLocalizations localizations, Jalali startDate, Jalali endDate, Jalali currentDate)
→ String
-
Returns an locale-appropriate string to describe the end of a date range.
-
formatRangeStartDate(MaterialLocalizations localizations, Jalali startDate, Jalali endDate)
→ String
-
Returns a locale-appropriate string to describe the start of a date range.
-
formatYear(Jalali date)
→ String
-
-
getDaysInMonth(int year, int month)
→ int
-
-
isBetweenStartAndEnd(Jalali startDate, Jalali endDate, Jalali date)
→ bool
-
Returns true if the date is between two
Jalali objects
-
isSameDay(Jalali dateA, Jalali dateB)
→ bool
-
Returns true if the two
Jalali objects have the same day, month, and
year.
-
isSameMonth(Jalali dateA, Jalali dateB)
→ bool
-
Returns true if the two
Jalali objects have the same month, and
year, or are both null.
-
monthDelta(Jalali startDate, Jalali endDate)
→ int
-
Determines the number of months between two
Jalali objects.
-
parseCompactDate(String inputString)
→ Jalali
-