Package org.moduliths.moments
Class ShiftedQuarter
java.lang.Object
org.moduliths.moments.ShiftedQuarter
A quarter that can be shifted to start at a configurable
Month.- Since:
- 1.3
- Author:
- Oliver Drotbohm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the givenLocalDateis contained in the currentShiftedQuarter.getEnd()getEndDate(Year year) Returns the end date of theShiftedQuarterfor the givenYear.getStart()getStartDate(Year year) Returns the start date of theShiftedQuarterfor the givenYear.booleannext()Returns the nextShiftedQuarter.static ShiftedQuarter
-
Constructor Details
-
ShiftedQuarter
public ShiftedQuarter()
-
-
Method Details
-
of
-
next
Returns the nextShiftedQuarter.- Returns:
- will never be null.
-
contains
Returns whether the givenLocalDateis contained in the currentShiftedQuarter.- Parameters:
date- must not be null.- Returns:
-
getStart
-
getEnd
-
isLastDay
-
getStartDate
Returns the start date of theShiftedQuarterfor the givenYear.- Parameters:
year- must not be null.- Returns:
- will never be null.
-
getEndDate
Returns the end date of theShiftedQuarterfor the givenYear.- Parameters:
year- must not be null.- Returns:
- will never be null.
-