An Accounting calendar system generally divides a year into smaller periods, similar in length to regular calendar months. The most common divisions either use 12 such 'months' (requiring one every quarter to be 5 weeks instead of 4), or use 13 of 4 weeks each (making one quarter have an extra month, or each quarter have partial months).
| Modifier and Type | Field and Description |
|---|---|
| private final int[] | elapsedWeeks
The elapsed number of weeks at the start of each month. |
| private final ValueRange | monthsInYearRange
The range of months in each year. |
| public static final AccountingYearDivision | QUARTERS_OF_PATTERN_4_4_5_WEEKS
The singleton instance for a year divided into 4 quarters, each having 3 months with lengths of 4, 4, and 5 weeks, respectively. |
| public static final AccountingYearDivision | QUARTERS_OF_PATTERN_4_5_4_WEEKS
The singleton instance for a year divided into 4 quarters, each having 3 months with lengths of 4, 5, and 4 weeks, respectively. |
| public static final AccountingYearDivision | QUARTERS_OF_PATTERN_5_4_4_WEEKS
The singleton instance for a year divided into 4 quarters, each having 3 months with lengths of 5, 4, and 4 weeks, respectively. |
| public static final AccountingYearDivision | THIRTEEN_EVEN_MONTHS_OF_4_WEEKS
The singleton instance for a year divided into 13 even months, each having 4 weeks. |
| private final int[] | weeksInMonths
The number of weeks in each month. |
| Access | Constructor and Description |
|---|---|
| private | AccountingYearDivision(int[]
The number of weeks in each month (period). weeksInMonths)Private constructor for enum, for creating cached info. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | Returns: the monthThe weeks elapsed since the start of the year. weeksElapsed)Get the month from a count of elapsed weeks. |
| pack-priv int | Returns: the monthThe weeks elapsed since the start of the year. weeksElapsed, int The month in which the leap-week resides leapWeekInMonth)Get the month from a count of elapsed weeks. |
| pack-priv ValueRange | Returns: the range of months (periods) in a year.Gets the range of months in a year. |
| pack-priv int | Returns: The number of weeks elapsed before the start of the month.The month month)Get the number of weeks elapsed before the start of the month. |
| pack-priv int | Returns: The number of weeks elapsed before the start of the month, including any leap week.The month month, int The month in which the leap-week resides leapWeekInMonth)Get the number of weeks elapsed before the start of the month. |
| pack-priv int | Returns: The count of weeks in the given month.The month for which to get the count of weeks. month)Get the number of weeks in the given month (period). |
| pack-priv int | Returns: The count of weeks in the given month, including any leap week.The month for which to get the count of weeks. month, int The month in which the leap-week resides leapWeekInMonth)Get the number of weeks in the given month (period), with the leap year in the indicated month. |
| pack-priv int | Returns: The length of the year in months.Gets the length of the year in months. |
| public static AccountingYearDivision | |
| public static AccountingYearDivision[] |
| elapsedWeeks | back to summary |
|---|---|
| private final int[] elapsedWeeks The elapsed number of weeks at the start of each month. | |
| monthsInYearRange | back to summary |
|---|---|
| private final ValueRange monthsInYearRange The range of months in each year. | |
| QUARTERS_OF_PATTERN_4_4_5_WEEKS | back to summary |
|---|---|
| public static final AccountingYearDivision QUARTERS_OF_PATTERN_4_4_5_WEEKS The singleton instance for a year divided into 4 quarters, each having 3 months with lengths of 4, 4, and 5 weeks, respectively. | |
| QUARTERS_OF_PATTERN_4_5_4_WEEKS | back to summary |
|---|---|
| public static final AccountingYearDivision QUARTERS_OF_PATTERN_4_5_4_WEEKS The singleton instance for a year divided into 4 quarters, each having 3 months with lengths of 4, 5, and 4 weeks, respectively. | |
| QUARTERS_OF_PATTERN_5_4_4_WEEKS | back to summary |
|---|---|
| public static final AccountingYearDivision QUARTERS_OF_PATTERN_5_4_4_WEEKS The singleton instance for a year divided into 4 quarters, each having 3 months with lengths of 5, 4, and 4 weeks, respectively. | |
| THIRTEEN_EVEN_MONTHS_OF_4_WEEKS | back to summary |
|---|---|
| public static final AccountingYearDivision THIRTEEN_EVEN_MONTHS_OF_4_WEEKS The singleton instance for a year divided into 13 even months, each having 4 weeks. | |
| weeksInMonths | back to summary |
|---|---|
| private final int[] weeksInMonths The number of weeks in each month. | |
| AccountingYearDivision | back to summary |
|---|---|
| private AccountingYearDivision(int[] weeksInMonths) Private constructor for enum, for creating cached info.
| |
| getMonthFromElapsedWeeks | back to summary |
|---|---|
| pack-priv int getMonthFromElapsedWeeks(int weeksElapsed) Get the month from a count of elapsed weeks.
| |
| getMonthFromElapsedWeeks | back to summary |
|---|---|
| pack-priv int getMonthFromElapsedWeeks(int weeksElapsed, int leapWeekInMonth) Get the month from a count of elapsed weeks.
| |
| getMonthsInYearRange | back to summary |
|---|---|
| pack-priv ValueRange getMonthsInYearRange() Gets the range of months in a year.
| |
| getWeeksAtStartOfMonth | back to summary |
|---|---|
| pack-priv int getWeeksAtStartOfMonth(int month) Get the number of weeks elapsed before the start of the month.
| |
| getWeeksAtStartOfMonth | back to summary |
|---|---|
| pack-priv int getWeeksAtStartOfMonth(int month, int leapWeekInMonth) Get the number of weeks elapsed before the start of the month.
| |
| getWeeksInMonth | back to summary |
|---|---|
| pack-priv int getWeeksInMonth(int month) Get the number of weeks in the given month (period).
| |
| getWeeksInMonth | back to summary |
|---|---|
| pack-priv int getWeeksInMonth(int month, int leapWeekInMonth) Get the number of weeks in the given month (period), with the leap year in the indicated month.
| |
| lengthOfYearInMonths | back to summary |
|---|---|
| pack-priv int lengthOfYearInMonths() Gets the length of the year in months.
| |
| valueOf | back to summary |
|---|---|
| public static AccountingYearDivision valueOf(String name) | |
| values | back to summary |
|---|---|
| public static AccountingYearDivision[] values() | |