ILibDateOptions class

A mutable bag of date components used to construct a date and to read it back through the ILibDate interface.

Provide whichever fields describe the date you want: calendar components (year/month/day/…), an absolute unixtime, or a Flutter dateTime. type/calendar selects which calendar the components are interpreted in (gregorian by default). The ILibDate accessor methods resolve the date on demand from these fields.

Implemented types

Constructors

ILibDateOptions({String? locale, int? year, int? month, int? week, int? day, int? hour, int? minute, int? second, int? millisecond, int? unixtime, double? julianday, double? rd, String? timezone, String? calendar, DateTime? dateTime, String? type, bool? dst})

Properties

calendar ↔ String?
The calendar of the date desired; an alias for type.
getter/setter pair
dateTime ↔ DateTime?
A Flutter DateTime to initialize from; maps to an absolute instant like unixtime.
getter/setter pair
day ↔ int?
The day of the month.
getter/setter pairoverride-getter
dst ↔ bool?
Optional DST disambiguation for the overlap hour at the end of DST. Null when unspecified.
getter/setter pairoverride-getter
hashCode → int
The hash code for this object.
no setterinherited
hour ↔ int?
The hour of the day (0–23).
getter/setter pairoverride-getter
julianday ↔ double?
Julian Day number. Takes precedence over calendar components when set.
getter/setter pair
locale ↔ String?
BCP-47 locale string used for locale-dependent calculations.
getter/setter pair
millisecond ↔ int?
The millisecond of the second (0–999).
getter/setter pairoverride-getter
minute ↔ int?
The minute of the hour (0–59).
getter/setter pairoverride-getter
month ↔ int?
The month (1-based) in the selected calendar.
getter/setter pairoverride-getter
rd ↔ double?
Rata Die number. Takes precedence over calendar components when set.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
second ↔ int?
The second of the minute (0–59).
getter/setter pairoverride-getter
timezone ↔ String?
IANA timezone name as a string.
getter/setter pairoverride-getter
type ↔ String?
The calendar/type of the date desired (e.g. 'gregorian', 'islamic').
getter/setter pair
unixtime ↔ int?
Absolute instant as unix time (milliseconds since the epoch). Takes precedence over the individual calendar components when set.
getter/setter pair
week ↔ int?
The week of the year.
getter/setter pair
year ↔ int?
The year in the selected calendar.
getter/setter pairoverride-getter

Methods

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

Operators

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