Class Quarter
java.lang.Object
org.deltava.beans.hr.Quarter
- All Implemented Interfaces:
Serializable
,Comparable<Quarter>
A bean to convert Dates into Quarters.
- Since:
- 3.3
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Quarter
public Quarter()Creates a Quarter from the current Date. -
Quarter
Creates a new Quarter from a Date.- Parameters:
dt
- the Date- Throws:
NullPointerException
- if dt is null
-
Quarter
public Quarter(int yq) Creates a new Quarter from a year/quarter combination- Parameters:
yq
- the year quarter- See Also:
-
-
Method Details
-
getYear
public int getYear()Returns the year.- Returns:
- the year
-
getQuarter
public int getQuarter()Returns the quarter number.- Returns:
- the quarter number
-
getYearQuarter
public int getYearQuarter()Returns the year and quarter in the form of a five digit number as YYYYQ.- Returns:
- the year and quarter
-
contains
Returns whether a date is in this Quarter.- Parameters:
dt
- the date- Returns:
- TRUE if in the Quarter, otherwise FALSE
-
toString
-
hashCode
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Quarter>
-