DatePart enum

Represents a part of a date (year, month, or day).

Provides metadata and operations for individual date components.

Inheritance
Available extensions

Values

year → const DatePart

Year component (4 digits).

const DatePart(_getYear, _computeYearValueRange, length: 4)
month → const DatePart

Month component.

const DatePart(_getMonth, _computeMonthValueRange)
day → const DatePart

Day component.

const DatePart(_getDay, _computeDayValueRange)

Properties

computeValueRange → (int?, int?) Function(Map<DatePart, int> values)
Function that computes the valid value range for this component.
final
getter int Function(DateTime dateTime)
Function that extracts the date/time component value from a DateTime.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
length int
Maximum number of digits for this date component.
final
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<DatePart>
A constant List of the values in this enum, in order of their declaration.