Day class
Represents a day of the month (1 to 31).
This class primarily wraps an integer value, ensuring it falls within the valid range for a day component of a date.
- Implemented types
Constructors
- Day.new(int value)
- Creates a Day instance.
- Day.fromDateTime(DateTime dateTime)
-
Creates a Day instance from a standard Dart DateTime object.
factory
Properties
Methods
-
clamp(
Year year, Month month) → Day -
compareTo(
Day other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
twoDigit(
) → String - formatted two-digit string (e.g., "01", "15").
Operators
-
operator <(
Day other) → bool - Checks if this day is strictly before another day.
-
operator <=(
Day other) → bool - Checks if this day is before or the same as another day.
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
Day other) → bool - Checks if this day is strictly after another day.
-
operator >=(
Day other) → bool - Checks if this day is after or the same as another day.