DateValidatorDueWorkdayMonth class
A DateValidator that validates a DateTime if the DateTime.day is the same value as dueWorkday. If exact is false, and the dueWorkday is greater than the days in month, the DateTime will be valid if the DateTime.day is the last day of the month.
- Inheritance
-
- Object
- DateValidator
- ExactDateValidator
- DateValidatorDueWorkdayMonth
- Implemented types
- Mixed-in types
- Implementers
Constructors
- DateValidatorDueWorkdayMonth(int dueWorkday, {bool exact = false})
-
A DateValidator that validates a DateTime if the DateTime.day is the
same value as
dueWorkday. Ifexactis false, and thedueWorkdayis greater than the days in month, the DateTime will be valid if the DateTime.day is the last day of the month.const - DateValidatorDueWorkdayMonth.from(DateTime date, {WorkdayDirection direction = WorkdayDirection.forward, bool exact = false})
-
A DateValidator that validates a DateTime if the DateTime.day is the
same value as dueWorkday.
If
exactis false, and the dueWorkday is greater than the days in month, the DateTime will be valid if the DateTime.day is the last day of the month.factory
Properties
- dueWorkday → int
-
The expected workday of the month.
final
- exact → bool
-
If true, the workday of the month must be exactly this dueWorkday.
If false, and the dueWorkday is greater than the workdays in month, the
DateTime will be valid if the DateTime.day is the last workday of the
month.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- inexact → bool
-
Returns whether the DateTime passed to valid or invalid can be
inexact.
no setteroverride
-
props
→ List<
Object> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
compareTo(
DateValidatorDueWorkdayMonth other) → int -
Compares this object to another object.
override
-
filterValidDates(
Iterable< DateTime> dates) → Iterable<DateTime> -
Returns the valid dates for this DateValidator in
dates.inherited -
invalid(
DateTime date) → bool -
Returns true if the
dateis invalid for this DateValidator.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
valid(
DateTime date) → bool -
Returns true if the
dateis valid for this DateValidator.override -
validsIn(
Iterable< DateTime> dates) → Iterable<DateTime> -
Returns the valid dates for this DateValidator in
dates.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override