ObjDateTimeNullExt extension
Properties
- day → int?
-
The day of the month
[1..31]
.no setter - hour → int?
-
The hour of the day, expressed as in a 24-hour clock
[0..23]
.no setter - microsecond → int?
-
The microsecond
[0...999]
.no setter - microsecondsSinceEpoch → int?
-
The number of microseconds since
the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
no setter
- millisecond → int?
-
The millisecond
[0...999]
.no setter - millisecondsSinceEpoch → int?
-
The number of milliseconds since
the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
no setter
- minute → int?
-
The minute
[0...59]
.no setter - month → int?
-
The month
[1..12]
.no setter - second → int?
-
The second
[0...59]
.no setter - timeZoneName → String?
-
The time zone name.
no setter
- timeZoneOffset → Duration?
-
The time zone offset, which
is the difference between local time and UTC.
no setter
- weekday → int?
-
The day of the week
monday
..sunday
.no setter - year → int?
-
The year.
no setter
Methods
-
add(
Duration duration) → DateTime? -
Returns a new DateTime instance with
duration
added tothis
. -
compareTo(
DateTime other) → int? -
Compares this DateTime object to
other
, returning zero if the values are equal. -
difference(
DateTime other) → Duration? -
Returns a Duration with the difference when subtracting
other
fromthis
. -
isAfter(
DateTime other) → bool? -
Returns true if
this
occurs afterother
. -
isAtSameMomentAs(
DateTime other) → bool? -
Returns true if
this
occurs at the same moment asother
. -
isBefore(
DateTime other) → bool? -
Returns true if
this
occurs beforeother
. -
subtract(
Duration duration) → DateTime? -
Returns a new DateTime instance with
duration
subtracted fromthis
. -
toIso8601String(
) → String? - Returns an ISO-8601 full-precision extended format representation.
-
toLocal(
) → DateTime? - Returns this DateTime value in the local time zone.
-
toUtc(
) → DateTime? - Returns this DateTime value in the UTC time zone.