Static (year, month)-keyed weekday-occurrence helpers, the no-seed
counterpart to the DateTime.getNthWeekdayOfMonthInYear instance extension.
Calendar-construction code (DST rules, public-holiday tables) computes
occurrences for an arbitrary year/month pair and has no seed DateTime to
hang the instance method on; these statics take the year/month explicitly so
no throwaway DateTime(year, month) is needed at every call site.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Static Methods
-
lastWeekdayOfMonth(
int year, int month, int weekday) → DateTime -
Returns the last
weekdayinmonthofyear— always a real date, since every weekday occurs at least four times a month. -
nthWeekdayOfMonth(
int year, int month, int n, int weekday) → DateTime? -
Returns the
nthweekdayinmonthofyear, ornullwhen that occurrence does not exist (e.g. a 5th Friday in a month with only four).