JalaliExt extension

Formatting, comparisons and day math on UJalali. UJalali.now().formatCustom("wN dd mN yyyy")

on

Properties

millisecondsSinceEpoch → int

Available on UJalali, provided by the JalaliExt extension

Milliseconds since 1970 (for storage/APIs).
no setter
quarter → int

Available on UJalali, provided by the JalaliExt extension

Season/quarter 1-4.
no setter

Methods

addHours(int hours) → UJalali

Available on UJalali, provided by the JalaliExt extension

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

Available on UJalali, provided by the JalaliExt extension

Adds seconds (negative allowed).
daysUntil(UJalali other) → int

Available on UJalali, provided by the JalaliExt extension

Days from this date to other (negative when earlier).
endOfWeek() → UJalali

Available on UJalali, provided by the JalaliExt extension

Friday of this week.
firstDayOfMonth() → UJalali

Available on UJalali, provided by the JalaliExt extension

The 1st of this month.
formatAfghanDate({bool persianDigits = false}) → String

Available on UJalali, provided by the JalaliExt extension

Date with Afghan month names. "شنبه 1 حمل 1403"
formatCompactDate({bool persianDigits = false}) → String

Available on UJalali, provided by the JalaliExt extension

"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

Available on UJalali, provided by the JalaliExt extension

"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

Available on UJalali, provided by the JalaliExt extension

"فروردین 1403".
formatShortDate({bool persianDigits = false}) → String

Available on UJalali, provided by the JalaliExt extension

"01 فروردین 1403".
formatTime({bool persianDigits = false}) → String

Available on UJalali, provided by the JalaliExt extension

"14:05:09".
isAfter(UJalali other) → bool

Available on UJalali, provided by the JalaliExt extension

True when later than other.
isAtSameMomentAs(UJalali other) → bool

Available on UJalali, provided by the JalaliExt extension

True when the same moment.
isBefore(UJalali other) → bool

Available on UJalali, provided by the JalaliExt extension

True when earlier than other.
isSameDayAs(UJalali other) → bool

Available on UJalali, provided by the JalaliExt extension

True when the same calendar day.
isThisMonth() → bool

Available on UJalali, provided by the JalaliExt extension

True when in the current Jalali month.
isToday() → bool

Available on UJalali, provided by the JalaliExt extension

True when this is today.
isWeekend() → bool

Available on UJalali, provided by the JalaliExt extension

True on Friday.
lastDayOfMonth() → UJalali

Available on UJalali, provided by the JalaliExt extension

The last day of this month (29/30/31).
nextDay() → UJalali

Available on UJalali, provided by the JalaliExt extension

Tomorrow of this date.
previousDay() → UJalali

Available on UJalali, provided by the JalaliExt extension

Yesterday of this date.
startOfWeek() → UJalali

Available on UJalali, provided by the JalaliExt extension

Saturday of this week.
weeksInYear() → int

Available on UJalali, provided by the JalaliExt extension

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.