CalendarDateTime class
- Implemented types
- Available extensions
Constructors
- CalendarDateTime(int year, [int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0])
- CalendarDateTime.fromDateTime(DateTime dateTime)
-
Creates a CalendarDateTime object from a DateTime object.
Ignores timezone.
factory
- CalendarDateTime.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch, {bool inLocalTime = false})
-
Creates a Date object from a timestamp in microseconds since epoch.
factory
- CalendarDateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch, {bool inLocalTime = false})
-
Creates a Date object from a timestamp in milliseconds since epoch.
factory
- CalendarDateTime.local()
-
Calendar Date & Time from local time.
factory
- CalendarDateTime.parse(String input)
-
Creates a CalendarDateTime object from a DateTime object.
ignores timezone.
factory
- CalendarDateTime.zulu()
-
Calendar Date & Time from UTC timestamp.
factory
Properties
- day → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hour → int
-
no setter
- microsecond → int
-
no setter
- microsecondsSinceEpoch → int
-
no setter
- millisecond → int
-
no setter
- millisecondsSinceEpoch → int
-
no setter
- minute → int
-
no setter
- month → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- second → int
-
no setter
- timeZoneName → String
-
no setter
- timeZoneOffset → Duration
-
no setter
- weekday → int
-
no setter
- year → int
-
no setter
Methods
-
add(
Duration duration) → CalendarDateTime - Add a duration to the date.
-
asCalendarDate(
) → CalendarDate -
Available on CalendarDateTime, provided by the CalendarDateConversion extension
-
asDateTime(
) → DateTime -
compareTo(
CalendarDateTime other) → int -
Compares this object to another object.
override
-
copyWith(
{int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) → CalendarDateTime -
difference(
CalendarDateTime other) → Duration - Difference between two dates.
-
isAfter(
CalendarDateTime other) → bool -
isAtSameMomentAs(
CalendarDateTime other) → bool -
isBefore(
CalendarDateTime other) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subtract(
Duration duration) → CalendarDateTime - Subtract a duration to the date.
-
to(
CalendarDateTime to, {required Duration by}) → Iterable< CalendarDateTime> -
Available on CalendarDateTime, provided by the CalendarDateTimeStrideUtil extension
Creates a generator iterator that yields dates from this date to thetodate,tois inclusive. -
toIso8601String(
) → String -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator +(
Duration duration) → CalendarDateTime -
operator -(
Duration duration) → CalendarDateTime -
operator <(
CalendarDateTime other) → bool -
operator <=(
CalendarDateTime other) → bool -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
CalendarDateTime other) → bool -
operator >=(
CalendarDateTime other) → bool
Static Methods
-
tryParse(
String input) → CalendarDateTime?
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