|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.time.calendar.CalendricalMatchers
public final class CalendricalMatchers
Provides common implementations of CalendricalMatcher
.
These matchers are useful and common implementations of CalendricalMatcher
.
A matcher allows any type of matching to be performed against a calendrical.
Examples might be checking of the calendrical represents Friday the Thirteenth,
or the last day of the month, or one of the American continent time-zones.
All the implemented matchers depend on the ISO calendar system.
This is a thread-safe utility class. All matchers returned are immutable and thread-safe.
Method Summary | |
---|---|
static CalendricalMatcher |
lastDayOfMonth()
Returns the last day-of-month matcher, which returns true if the date is the last valid day of the month. |
static CalendricalMatcher |
lastDayOfYear()
Returns the last day-of-year matcher, which returns true if the date is the last valid day of the year. |
static CalendricalMatcher |
leapDay()
Returns the leap day matcher, which returns true if the date is February 29th in a leap year. |
static CalendricalMatcher |
leapYear()
Returns the leap year matcher, which returns true if the date is in a leap year. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CalendricalMatcher leapYear()
The input 2011-01-15 will return false.
The input 2012-01-15 will return true (leap year).
public static CalendricalMatcher leapDay()
The input 2011-02-27 will return false.
The input 2011-02-28 will return false.
The input 2012-02-28 will return false (leap year).
The input 2012-02-29 will return true (leap year).
public static CalendricalMatcher lastDayOfMonth()
The input 2011-02-27 will return false.
The input 2011-02-28 will return true.
The input 2012-02-28 will return false (leap year).
The input 2012-02-29 will return true (leap year).
public static CalendricalMatcher lastDayOfYear()
The input 2011-12-30 will return false.
The input 2011-12-31 will return true.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |