ILibDate class abstract

The common read interface shared by every calendar date in this library.

A date exposes both its calendar-specific components (year/month/day/… in its own calendar) and the underlying UTC instant (rata die / Julian Day / unix time), so timezone and DST logic can reason about an instant independently of how a particular calendar labels it. Concrete instances are created via the date factories, not by implementing this interface directly.

Implementers

Constructors

ILibDate()

Properties

day int?
The day of the month in this date's own calendar, or null if unspecified.
no setter
dst bool?
Optional DST disambiguation for the overlap hour at the end of DST, when the same local wall time occurs twice. Null when unspecified.
no setter
hashCode int
The hash code for this object.
no setterinherited
hour int?
The hour of the day (0–23), or null if unspecified.
no setter
millisecond int?
The millisecond of the second (0–999), or null if unspecified.
no setter
minute int?
The minute of the hour (0–59), or null if unspecified.
no setter
month int?
The month (1-based) in this date's own calendar, or null if unspecified.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second int?
The second of the minute (0–59), or null if unspecified.
no setter
timezone String?
The IANA timezone id associated with this date, or null if none.
no setter
year int?
The year in this date's own calendar, or null if unspecified.
no setter

Methods

getCalendar() String
The name of the calendar this date belongs to (e.g. 'gregorian').
getDayOfWeek() int
The day of the week for this date: 0 = Sunday through 6 = Saturday.
getDayOfYear() int
The ordinal day number within the current year (1 = January 1st).
getEra() int
The era of this date: a calendar-specific code (e.g. 1 = CE, -1 = BCE for the Gregorian calendar).
getJulianDay() double
The Julian Day equivalent to this date's instant as a number.
getRataDie() double
The Rata Die (fixed day) number of this date's instant, regardless of its calendar.
getTime() int
The unix time (milliseconds since the epoch) equivalent to this date, or -1 when the instant falls outside the representable range.
getTimeExtended() int
The extended unix time equivalent to this date, covering instants outside the range representable by getTime.
getTimeZone() String?
The timezone associated with this date as a string, or null if none.
getWeekOfMonth(String? locale) int
The ordinal number of the week within the month.
getWeekOfYear() int
The ISO 8601 week number within the current year.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited