NominalDateTime class final
Datetime exactly as numerically represented.
Unlike DateTime
, it does not validate for authenticity,
so it can hold imaginary dates as they are.
- Implemented types
Constructors
- NominalDateTime.new(Location location, int year, [int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0])
- Creates a nominal datetime.
- NominalDateTime.fromDateTime(Location location, DateTime dateTime)
-
Creates a nominal datetime from a
DateTime
.factory - NominalDateTime.fromTZDateTime(TZDateTime dateTime)
-
Creates a nominal datetime from a
TZDateTime
.factory
Properties
- day → int
-
The day.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hour → int
-
The hour.
final
- isImaginary → bool
-
true
if the date is not exist.no setter - isLeapYear → bool
-
true
if the year is a leap year.no setter - location → Location
-
The time zone.
final
- microsecond → int
-
The microsecond.
final
- millisecond → int
-
The millisecond.
final
- minute → int
-
The minute.
final
- month → int
-
The month.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- second → int
-
The second.
final
- year → int
-
The year.
final
Methods
-
compareTo(
NominalDateTime other) → int -
Compares this object to another object.
override
-
copyWith(
{Location? location, int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) → NominalDateTime - Creates a new nominal datetime from this one by updating individual properties.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
toTZDateTime(
) → TZDateTime -
Converts to a
TZDateTime
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
specialDates(
Location location, DateTime start, DateTime end, {required bool imaginary}) → List< NominalDateTime>