UDate class abstract

Base of UJalali and UGregorian: y/m/d/time, Julian day, comparison and math.

Implemented types
Implementers

Constructors

UDate()
Base constructor.
const

Properties

day → int
Day of the month.
no setter
formatter → UDateFormatter
Text pieces for formatting.
no setter
hashCode → int
The hash code for this object.
no setteroverride
hour → int
Hour 0-23.
no setter
julianDayNumber → int
Day number shared by every calendar (for converting and differences).
no setter
millisecond → int
Millisecond 0-999.
no setter
minute → int
Minute 0-59.
no setter
month → int
Month 1-12.
no setter
monthLength → int
Days in this month.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
second → int
Second 0-59.
no setter
time → Duration
Time of day as a Duration.
no setter
weekDay → int
Weekday 1-7 (Jalali: 1 = Saturday).
no setter
year → int
Year.
no setter

Methods

add({int years = 0, int months = 0, int days = 0, int hours = 0, int minutes = 0, int seconds = 0, int milliseconds = 0}) → UDate
Adds any amount; months clamp the day (31 + 1 month → 30), days and time overflow correctly. j.add(months: 1, days: 3)
compareTo(UDate other) → int
Compares this object to another object.
override
copy({int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond}) → UDate
Copy with some parts changed; throws RangeError when the day does not exist.
distanceTo(UDate other) → int
Days from this date to other.
isLeapYear() → bool
True in a leap year.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDateTime() → DateTime
Local Dart DateTime.
toString() → String
A string representation of this object.
inherited
toUtcDateTime() → DateTime
UTC Dart DateTime.

Operators

operator +(int days) → UDate
operator -(int days) → UDate
operator <(UDate other) → bool
operator <=(UDate other) → bool
operator ==(Object other) → bool
The equality operator.
override
operator >(UDate other) → bool
operator >=(UDate other) → bool

Constants

maxJDN → const int
Largest supported Julian day number.
minJDN → const int
Smallest supported Julian day number.