YearMonth class
- Implemented types
Constructors
- YearMonth(int year, int month)
-
Create new YearMonth's
yearandmonthwith valid valueconst - YearMonth.dateTime(DateTime dateTime)
-
Inspect DateTime object and convert back to YearMonth
factory
- YearMonth.now()
-
Get current year and month from DateTime.now
factory
Properties
-
allDaysInMonth
→ Set<
DateTime> -
Generate a Set of DateTime which is from YearMonth
no setter
- firstDay → DateTime
-
Get first day of YearMonth and convert back to YearMonth
no setter
- hashCode → int
-
Hash code from
Obejct.hashCode, but not design for using ==.no setteroverride - lastDay → DateTime
-
Get last day of YearMonth and convert back to YearMonth
no setter
- month → int
-
Month between
1to12final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- todayInThisMonth → bool
-
Check today is contains in this month from YearMonth.now
no setter
- year → int
-
Year which follow ISO 8601
standard of the year format
final
Methods
-
compareTo(
YearMonth other) → int -
Implemented from Comparable which equal
0means this andotherare the same, greater than0meansotheris greater and lesser than0meansotheris lesseroverride -
formatString(
{String format = "MMMM, yyyy", String? locale}) → String -
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 compare) → bool -
Compare this YearMonth is lesser than
compare -
operator <=(
Object compare) → bool - Combine operator of == and <
-
operator ==(
Object compare) → bool -
Compare this YearMonth and
comparethe sameoverride -
operator >(
Object compare) → bool -
Compare this YearMonth is greater than
compare -
operator >=(
Object compare) → bool - Combine operator of == and >