Package com.opengamma.strata.basics.date
Class DateAdjusters
- java.lang.Object
-
- com.opengamma.strata.basics.date.DateAdjusters
-
public final class DateAdjusters extends Object
Date adjusters that perform useful operations onLocalDate
.This is a static utility class. Returned objects are immutable and thread-safe.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateAdjuster
nextLeapDay()
Obtains an instance that finds the next leap day after the input date.static DateAdjuster
nextOrSameLeapDay()
Obtains a date adjuster that finds the next leap day on or after the input date.
-
-
-
Method Detail
-
nextLeapDay
public static DateAdjuster nextLeapDay()
Obtains an instance that finds the next leap day after the input date.The adjuster returns the next occurrence of February 29 after the input date.
- Returns:
- an adjuster that finds the next leap day
-
nextOrSameLeapDay
public static DateAdjuster nextOrSameLeapDay()
Obtains a date adjuster that finds the next leap day on or after the input date.If the input date is February 29, the input date is returned unaltered. Otherwise, the adjuster returns the next occurrence of February 29 after the input date.
- Returns:
- an adjuster that finds the next leap day
-
-