Java Utililty Methods Month

List of utility methods to do Month

Description

The list of methods to do Month are organized into topic(s).

Method

booleanisNumMonth(int m)
is Num Month
return m >= 1 && m <= 12;
booleanisQuarterMonth(String[] types)
is Quarter Month
for (int i = 0; i < types.length; i++) {
    if (DATE_TIME_LEVEL_TYPE_QUARTER.equals(types[i]))
        return true;
return false;
booleanisSameMonth(String preMonth, String month)
is Same Month
return preMonth.substring(4, 6).equals(month.substring(4, 6));
int[]issueMonth(int issue1, int issue2)
issue Month
int k = issue1;
issue1 = k >= issue2 ? k : issue2;
issue2 = k < issue2 ? k : issue2;
int months = issueMonthNum(issue1, issue2);
int[] intArray = new int[months + 1];
intArray[0] = issue2;
intArray[months] = issue1;
int year = issue2 / 100;
...
intissueMonthNum(int issue1, int issue2)
issue Month Num
int k = issue1;
issue1 = k >= issue2 ? k : issue2;
issue2 = k < issue2 ? k : issue2;
int yearnum = issue1 / 100 - issue2 / 100;
int monthnum = issue1 % 100 - issue2 % 100;
if (monthnum < 0)
    return 12 * (yearnum - 1) + (12 + monthnum);
else if (monthnum > 0)
...
booleanisValidMonth(int month)
is Valid Month
return month > 0 && month < 13;
booleanisValidObjectModelMonth(int aMonth)
is Valid Object Model Month
boolean result = false;
if (aMonth > 0 && aMonth < 13) {
    result = true;
} else {
    result = false;
return result;
booleanisWeekOfMonth(int num)
is Week Of Month
return isNumBetween(1, num, 4);
intleapMonth(int y)
leap Month
return (int) (lunarInfo[y - 1900] & 0xf);
booleanlineStartsWithMonthString(String line)
line Starts With Month String
if (line.length() <= 10)
    return false;
String ll = line.substring(0, 3).toUpperCase();
for (String mm : monthString) {
    if (ll.startsWith(mm))
        return true;
return false;
...