public class LocalDateSuppliers
extends java.lang.Object
setClock(Clock).| Modifier and Type | Method and Description |
|---|---|
static java.time.Clock |
createClockFrom(java.time.LocalDate localDate)
Returns a clock from the given local date.
|
static TemporalCondition<java.time.LocalDate> |
date(int year,
int month,
int dayOfMonth)
Return a temporal condition that returns the local date from the given year, month, and day.
|
static TemporalCondition<java.time.LocalDate> |
firstDayOfThisMonth()
Return a temporal condition that returns today's local date at the first day of month.
|
static TemporalCondition<java.time.LocalDate> |
firstDayOfThisYear()
Return a temporal condition that returns today's local date at the first day of year.
|
static java.time.Clock |
getClock()
Returns the clock.
|
static boolean |
isClockSet()
Returns true if the clock is set.
|
static TemporalCondition<java.time.LocalDate> |
lastDayOfThisMonth()
Return a temporal condition that returns today's local date at the last day of month.
|
static TemporalCondition<java.time.LocalDate> |
lastDayOfThisYear()
Return a temporal condition that returns today's local date at the last day of year.
|
static void |
setClock(java.time.Clock clock)
Sets the clock.
|
static void |
setDefaultClock()
Removes the clock.
|
static TemporalCondition<java.time.LocalDate> |
today()
Return a temporal condition that returns today's local date.
|
static TemporalCondition<java.time.LocalDate> |
todayMinus(int amountToSubstract,
java.time.temporal.TemporalUnit unit)
Return a temporal condition that returns today's local date minus the given amount and unit.
|
static TemporalCondition<java.time.LocalDate> |
todayMinusDays(int daysToSubstract)
Return a temporal condition that returns today's local date minus the given amount in days.
|
static TemporalCondition<java.time.LocalDate> |
todayMinusYears(int yearsToSubstract)
Return a temporal condition that returns today's local date minus the given amount in years.
|
static TemporalCondition<java.time.LocalDate> |
todayPlus(int amountToAdd,
java.time.temporal.TemporalUnit unit)
Return a temporal condition that returns today's local date plus the given amount and unit.
|
static TemporalCondition<java.time.LocalDate> |
todayPlusDays(int daysToAdd)
Return a temporal condition that returns today's local date plus the given amount in days.
|
static TemporalCondition<java.time.LocalDate> |
todayPlusYears(int yearsToAdd)
Return a temporal condition that returns today's local date plus the given amount in years.
|
public static java.time.Clock createClockFrom(java.time.LocalDate localDate)
localDate - the date to set the clock atpublic static boolean isClockSet()
public static void setClock(java.time.Clock clock)
clock - the clock to setpublic static java.time.Clock getClock()
public static void setDefaultClock()
public static TemporalCondition<java.time.LocalDate> today()
public static TemporalCondition<java.time.LocalDate> todayPlus(int amountToAdd, java.time.temporal.TemporalUnit unit)
amountToAdd - the amount to addunit - the unit of the amountpublic static TemporalCondition<java.time.LocalDate> todayPlusDays(int daysToAdd)
daysToAdd - the amount of days to addpublic static TemporalCondition<java.time.LocalDate> todayPlusYears(int yearsToAdd)
yearsToAdd - the amount of years to addpublic static TemporalCondition<java.time.LocalDate> todayMinus(int amountToSubstract, java.time.temporal.TemporalUnit unit)
amountToSubstract - the amount to removeunit - the unit of the amountpublic static TemporalCondition<java.time.LocalDate> todayMinusDays(int daysToSubstract)
daysToSubstract - the amount of days to removepublic static TemporalCondition<java.time.LocalDate> todayMinusYears(int yearsToSubstract)
yearsToSubstract - the amount of years to removepublic static TemporalCondition<java.time.LocalDate> firstDayOfThisMonth()
public static TemporalCondition<java.time.LocalDate> firstDayOfThisYear()
public static TemporalCondition<java.time.LocalDate> lastDayOfThisMonth()
public static TemporalCondition<java.time.LocalDate> lastDayOfThisYear()
public static TemporalCondition<java.time.LocalDate> date(int year, int month, int dayOfMonth)
year - the year of the datemonth - the month of the datedayOfMonth - the day of the date