|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.agora.simulator.control.analysis.AnalysisDate
public class AnalysisDate
The Class AnalysisDate.
Constructor Summary | |
---|---|
AnalysisDate(AnalysisDate copy)
Instantiates a new analysis date. |
|
AnalysisDate(java.util.Date date,
int basis)
Instantiates a new analysis date. |
Method Summary | |
---|---|
void |
addMonths(int monthCount)
Adds the months. |
boolean |
eq(AnalysisDate compareDate)
Eq. |
int |
getActualEOMCount(int frequency)
Gets the actual eom count. |
static double |
getAverageYearLength(int startYear,
int endYear)
Gets the average year length. |
AnalysisDate |
getDate()
Gets the date. |
int |
getDay()
Gets the day. |
static int |
getDaysInYear(AnalysisDate date,
int basis)
Gets the days in year. |
static int |
getDaysInYears(int fromYear,
int toYear)
Gets the days in years. |
static int |
getDiff(AnalysisDate startDate,
AnalysisDate endDate)
Gets the diff. |
static int |
getDiff(AnalysisDate startDate,
AnalysisDate endDate,
boolean forceThirty)
Gets the diff. |
static int |
getLastDayOfMonth(int month,
int year)
Gets the last day of month. |
int |
getMonth()
Gets the month. |
int |
getOriginalDay()
Gets the original day. |
int |
getYear()
Gets the year. |
static double |
getYearfrac(AnalysisDate startDate,
AnalysisDate endDate,
int basis)
Gets the yearfrac. |
boolean |
gt(AnalysisDate compareDate)
Gt. |
boolean |
isLastDay()
Checks if is last day. |
static boolean |
isLeapYear(int i)
Checks if is leap year. |
boolean |
isThirtyDays()
Checks if is thirty days. |
boolean |
le(AnalysisDate compareDate)
Le. |
boolean |
lt(AnalysisDate compareDate)
Lt. |
void |
setDay(int day)
Sets the day. |
void |
setMonth(int month)
Sets the month. |
void |
setOriginalday(int originalday)
Sets the originalday. |
void |
setYear(int year)
Sets the year. |
static boolean |
shouldCountFeb29(AnalysisDate startDate,
AnalysisDate endDate)
Should count feb29. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnalysisDate(java.util.Date date, int basis)
date
- the datebasis
- the basispublic AnalysisDate(AnalysisDate copy)
copy
- the copyMethod Detail |
---|
public static int getLastDayOfMonth(int month, int year)
month
- the monthyear
- the year
public static boolean isLeapYear(int i)
i
- the i
public boolean lt(AnalysisDate compareDate)
compareDate
- the compare date
public boolean le(AnalysisDate compareDate)
compareDate
- the compare date
public boolean eq(AnalysisDate compareDate)
compareDate
- the compare date
public boolean gt(AnalysisDate compareDate)
compareDate
- the compare date
public void addMonths(int monthCount)
monthCount
- the month countpublic static int getDiff(AnalysisDate startDate, AnalysisDate endDate)
startDate
- the start dateendDate
- the end date
public static int getDiff(AnalysisDate startDate, AnalysisDate endDate, boolean forceThirty)
startDate
- the start dateendDate
- the end dateforceThirty
- the force thirty
public static int getDaysInYears(int fromYear, int toYear)
fromYear
- the from yeartoYear
- the to year
public int getOriginalDay()
public void setOriginalday(int originalday)
originalday
- the new originaldaypublic int getDay()
public void setDay(int day)
day
- the new daypublic int getMonth()
public void setMonth(int month)
month
- the new monthpublic int getYear()
public void setYear(int year)
year
- the new yearpublic boolean isThirtyDays()
public AnalysisDate getDate()
public static int getDaysInYear(AnalysisDate date, int basis) throws java.lang.Exception
date
- the datebasis
- the basis
java.lang.Exception
- the exceptionpublic boolean isLastDay()
public static boolean shouldCountFeb29(AnalysisDate startDate, AnalysisDate endDate)
startDate
- the start dateendDate
- the end date
public int getActualEOMCount(int frequency)
frequency
- the frequency
public static double getYearfrac(AnalysisDate startDate, AnalysisDate endDate, int basis)
startDate
- the start dateendDate
- the end datebasis
- the basis
public static double getAverageYearLength(int startYear, int endYear)
startYear
- the start yearendYear
- the end year
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |