CalendarDate class

Implemented types
Available extensions

Constructors

CalendarDate(int year, [int month = 1, int day = 1])
CalendarDate.fromDateTime(DateTime dateTime)
Creates a DateUTC object from a DateTime object. Ignores timezone.
factory
CalendarDate.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch, {bool inLocalTime = false})
Creates a Date object from a timestamp in microseconds since epoch. It will truncate the time component.
factory
CalendarDate.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch, {bool inLocalTime = false})
Creates a Date object from a timestamp in milliseconds since epoch. It will truncate the time component.
factory
CalendarDate.local()
Calendar Date from local time.
factory
CalendarDate.parse(String input)
Creates a DateUTC object from a DateTime object. ignores timezone.
factory
CalendarDate.zulu()
Calendar Date from UTC timestamp.
factory

Properties

day int
no setter
hashCode int
The hash code for this object.
no setteroverride
microsecondsSinceEpoch int
no setter
millisecondsSinceEpoch int
no setter
month int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeZoneName String
no setter
timeZoneOffset Duration
no setter
weekday int
no setter
year int
no setter

Methods

add(Duration duration) CalendarDate
Add a duration to the date. It will ignore time attributes that would not change the year, month, or day.
asCalendarDateTime() CalendarDateTime

Available on CalendarDate, provided by the CalendarDateTimeConversion extension

asDateTime() DateTime
compareTo(CalendarDate other) int
Compares this object to another object.
override
copyWith({int? year, int? month, int? day}) CalendarDate
difference(CalendarDate other) Duration
Difference between two dates.
isAfter(CalendarDate other) bool
isAtSameMomentAs(CalendarDate other) bool
isBefore(CalendarDate other) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subtract(Duration duration) CalendarDate
Subtract a duration to the date. It will ignore time attributes that would not change the year, month, or day.
to(CalendarDate to, {required Duration by}) Iterable<CalendarDate>

Available on CalendarDate, provided by the CalendarDateStrideUtil extension

Creates a generator iterator that yields dates from this date to the to date, to is inclusive.
toIso8601String() String
toString() String
A string representation of this object.
override

Operators

operator +(Duration duration) CalendarDate
operator -(Duration duration) CalendarDate
operator <(CalendarDate other) bool
operator <=(CalendarDate other) bool
operator ==(Object other) bool
The equality operator.
override
operator >(CalendarDate other) bool
operator >=(CalendarDate other) bool

Static Methods

tryParse(String input) CalendarDate?

Constants

april → const int
august → const int
daysPerWeek → const int
december → const int
february → const int
friday → const int
january → const int
july → const int
june → const int
march → const int
may → const int
monday → const int
monthsPerYear → const int
november → const int
october → const int
saturday → const int
september → const int
sunday → const int
thursday → const int
tuesday → const int
wednesday → const int