|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.accpac.sm.FiscalCalendar
@ThreadSafe public final class FiscalCalendar
The FiscalCalendar
class provides methods to access the fiscal
calendar set up in the company. The results returned reflect the state of the
fiscal calendar at the time that the calls are made; it is possible for the
same call to return different answers at different times.
An instance of this class cannot be created directly by applications. It
should be obtained from the Program's Program.getFiscalCalendar()
method.
The class provides inner classes to give access to the information:
Nested Class Summary | |
---|---|
static class |
FiscalCalendar.DateRange
A date range, as returned by getPeriodDates and
other functions |
class |
FiscalCalendar.FiscalPeriod
The fiscal period returned by getPeriod |
class |
FiscalCalendar.FiscalYear
The properties of a fiscal year, as returned by getYear
and other methods |
Method Summary | |
---|---|
FiscalCalendar.FiscalYear |
getFirstYear()
returns the first fiscal year in the calendar. |
FiscalCalendar.FiscalYear |
getLastYear()
returns the last fiscal year in the calendar. |
FiscalCalendar.FiscalPeriod |
getPeriod(java.util.Date date)
Locates the fiscal year and period a given date falls on. |
FiscalCalendar.DateRange |
getPeriodDates(int year,
int period)
Retrieves the start and end dates of a given fiscal year and period. |
int |
getQuarter(int year,
int period)
retrieves the quarter a given fiscal period belongs to. |
FiscalCalendar.DateRange |
getQuarterDates(int year,
int quarter)
Retrieves the start and end dates of a given fiscal year and quarter. |
FiscalCalendar.FiscalYear |
getYear(int year)
Looks up a fiscal year in the calendar and retrieves its details. |
FiscalCalendar.DateRange |
getYearDates(int year)
Retrieves the start and end dates of a given fiscal year. |
java.util.List<java.lang.Integer> |
getYears()
Return a list of the years that are in the Fiscal Calendar, as integers. |
boolean |
isPeriodOpen(int year,
int period)
Gets whether a fiscal period is open or not |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public FiscalCalendar.FiscalYear getFirstYear()
getLastYear()
,
#getYear(String)
,
getYears()
public FiscalCalendar.FiscalYear getLastYear()
getFirstYear()
,
#getYear(String)
,
getYears()
public FiscalCalendar.FiscalPeriod getPeriod(java.util.Date date)
date
- Date
public FiscalCalendar.DateRange getPeriodDates(int year, int period)
year
- Fiscal year.period
- Fiscal period within the fiscal year.
public int getQuarter(int year, int period)
year
- Fiscal yearperiod
- Fiscal period within the year
java.lang.IllegalArgumentException
- If the fiscal period is not in the fiscal calendarpublic FiscalCalendar.DateRange getQuarterDates(int year, int quarter)
year
- Fiscal year.quarter
- Quarter within the fiscal year.
public FiscalCalendar.FiscalYear getYear(int year)
year
- The fiscal year to locate in the fiscal calendar.
public FiscalCalendar.DateRange getYearDates(int year)
year
- Fiscal year.
public java.util.List<java.lang.Integer> getYears()
public boolean isPeriodOpen(int year, int period)
year
- Fiscal year.period
- Fiscal period within the fiscal year.
IllgalArgumentException
- if the fiscal period is not in the fiscal calendar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |