operator <= method
Compares two dates to see if the left one is earlier than or equal to the right one.
Only dates with the same calendar system can be compared. See the top-level type documentation for more information about comparisons.
this: First operand of the comparisonrhs: Second operand of the comparison
Returns: true if the this is earlier than or equal to other, false otherwise.
ArgumentException: The calendar system ofotheris not the same as the calendar ofthis.
Implementation
bool operator <=(LocalDate other) {
Preconditions.checkArgument(calendar == other.calendar, 'rhs',
"Only values in the same calendar can be compared");
return compareTo(other) <= 0;
}