JalaliExt extension
Formatting, comparisons and day math on UJalali. UJalali.now().formatCustom("wN dd mN yyyy")
- on
Properties
Methods
-
addHours(
int hours) → UJalali - Adds hours (negative allowed), rolling over days.
-
addMinutes(
int minutes) → UJalali -
Available on UJalali, provided by the JalaliExt extension
Adds minutes (negative allowed), rolling over hours and days.j.addMinutes(-90) -
addSeconds(
int seconds) → UJalali - Adds seconds (negative allowed).
-
daysUntil(
UJalali other) → int -
Available on UJalali, provided by the JalaliExt extension
Days from this date toother(negative when earlier). -
endOfWeek(
) → UJalali - Friday of this week.
-
firstDayOfMonth(
) → UJalali - The 1st of this month.
-
formatAfghanDate(
{bool persianDigits = false}) → String - Date with Afghan month names. "شنبه 1 حمل 1403"
-
formatCompactDate(
{bool persianDigits = false}) → String - "1403/01/01".
-
formatCustom(
String pattern, {bool persianDigits = false}) → String -
Available on UJalali, provided by the JalaliExt extension
Your own pattern: yyyy yy mm dd mN mNAf wN wS wW HH MM SS q.j.formatCustom("dd mN yyyy - HH:MM") -
formatDateTime(
{bool persianDigits = false}) → String - "1403-01-01 14:05:09".
-
formatFullDate(
{bool persianDigits = false}) → String -
Available on UJalali, provided by the JalaliExt extension
"شنبه ۱ فروردین ۱۴۰۳" style (weekday day month year).j.formatFullDate(persianDigits: true) -
formatMonthYear(
{bool persianDigits = false}) → String - "فروردین 1403".
-
formatShortDate(
{bool persianDigits = false}) → String - "01 فروردین 1403".
-
formatTime(
{bool persianDigits = false}) → String - "14:05:09".
-
isAfter(
UJalali other) → bool -
Available on UJalali, provided by the JalaliExt extension
True when later thanother. -
isAtSameMomentAs(
UJalali other) → bool - True when the same moment.
-
isBefore(
UJalali other) → bool -
Available on UJalali, provided by the JalaliExt extension
True when earlier thanother. -
isSameDayAs(
UJalali other) → bool - True when the same calendar day.
-
isThisMonth(
) → bool - True when in the current Jalali month.
-
isToday(
) → bool - True when this is today.
-
isWeekend(
) → bool - True on Friday.
-
lastDayOfMonth(
) → UJalali - The last day of this month (29/30/31).
-
nextDay(
) → UJalali - Tomorrow of this date.
-
previousDay(
) → UJalali - Yesterday of this date.
-
startOfWeek(
) → UJalali - Saturday of this week.
-
weeksInYear(
) → int - Number of weeks in this Jalali year.
Constants
- aban → const int
- Month number 8.
- azar → const int
- Month number 9.
- bahman → const int
- Month number 11.
- dey → const int
- Month number 10.
- esfand → const int
- Month number 12.
- farvardin → const int
- Month number 1.
- friday → const int
- Weekday number of Friday (weekend).
- khordad → const int
- Month number 3.
- mehr → const int
- Month number 7.
- monday → const int
- Weekday number of Monday (Jalali week starts Saturday = 1).
-
months
→ const List<
String> - Persian month names.
- mordad → const int
- Month number 5.
-
narrowWeekdays
→ const List<
String> - One-letter weekday names from Saturday.
- ordibehesht → const int
- Month number 2.
- saturday → const int
- Weekday number of Saturday (first day).
- shahrivar → const int
- Month number 6.
-
shortDayName
→ const List<
String> - Short weekday names from Saturday. "۱شنبه"
- sunday → const int
- Weekday number of Sunday.
- thursday → const int
- Weekday number of Thursday.
- tir → const int
- Month number 4.
- tuesday → const int
- Weekday number of Tuesday.
- wednesday → const int
- Weekday number of Wednesday.