DateTimeTimeExtension extension
- on
Properties
- date → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns only year, month and dayno setter - daysInMonth → int
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the amount of days that are in this month.no setter - endOfDay → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the last microsecond of the day (23:59:59.999999)no setter - firstDayOfMonth → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the first day of this monthno setter - firstDayOfWeek → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the Monday of this weekno setter - firstDayOfYear → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the first day of this yearno setter - isLeapYear → bool
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true if this year is a leap year.no setter - isToday → bool
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns if today, trueno setter - isTomorrow → bool
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns if tomorrow, trueno setter - isWeekend → bool
-
Available on DateTime, provided by the DateTimeTimeExtension extension
no setter - isWorkday → bool
-
Available on DateTime, provided by the DateTimeTimeExtension extension
no setter - lastDayOfMonth → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the last day of this month (considers leap years)no setter - lastDayOfWeek → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the Sunday of this weekno setter - lastDayOfYear → DateTime
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns the last day of this yearno setter - timeOfDay → Duration
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns only the timeno setter - wasYesterday → bool
-
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns if yesterday, trueno setter
Methods
-
clamp(
{DateTime? min, DateTime? max}) → DateTime -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns this DateTime clamped to be in the rangemin
-max
. -
copyWith(
{int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) → DateTime -
Available on DateTime, provided by the DateTimeTimeExtension extension
-
isAtSameDayAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is on the same day asthis
. -
isAtSameHourAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is at the same hour asthis
. -
isAtSameMicrosecondAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is at the same microsecond asthis
. -
isAtSameMillisecondAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is at the same millisecond asthis
. -
isAtSameMinuteAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is at the same minute asthis
. -
isAtSameMonthAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is in the same month asthis
. -
isAtSameSecondAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is at the same second asthis
. -
isAtSameYearAs(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns true ifother
is in the same year asthis
. -
shift(
{int years = 0, int months = 0, int days = 0, int hours = 0, int minutes = 0, int seconds = 0, int milliseconds = 0, int microseconds = 0}) → DateTime -
Available on DateTime, provided by the DateTimeTimeExtension extension
Adds time units to the calendar date and/or clock time. -
to(
DateTime to, {Duration by = const Duration(days: 1)}) → Iterable< DateTime> -
Available on DateTime, provided by the DateTimeTimeExtension extension
Returns a range of dates toto
, exclusive start, inclusive end
Operators
-
operator +(
Duration duration) → DateTime -
Available on DateTime, provided by the DateTimeTimeExtension extension
Adds this DateTime and Duration and returns the sum as a new DateTime object. -
operator -(
Duration duration) → DateTime -
Available on DateTime, provided by the DateTimeTimeExtension extension
Subtracts the Duration from this DateTime returns the difference as a new DateTime object.