Java Utililty Methods Day in Month

List of utility methods to do Day in Month

Description

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

Method

intgetMonthDay(int year, int month)
get Month Day
return getMonthDayByYear(year)[(--month)];
String[]getMonthDayFormats()
get Month Day Formats
return monthDayFormats;
intgetMonthDays(int year, int month)
get Month Days
switch (month) {
case 1:
    return 31;
case 2:
    if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) {
        return 29;
    } else {
        return 28;
...
int[]getMonthDaysArray(int year)
get Month Days Array
int[] a1 = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
int[] a2 = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
if (year <= 1582) {
    if ((year % 4) == 0) {
        if (year == 4) {
            return a1;
        return a2;
...
StringgetMonthDayString(long l, boolean timezone, boolean formated)
get Month Day String
if (timezone)
    l += timeZoneOffset;
if (l < 0L)
    return formated ? "01-01" : "0101";
if (l > accmulated_timemillis_year[229])
    return formated ? "12-31" : "1231";
int year = 9999;
int mon = 0;
...
StringgetMonthlyCronExpression(int minutes, int hours, int dayOfMonth)
Generates a cron pattern that will execute every month at the dayOfMonth at hour:minute
return getCronExpression("0", String.valueOf(minutes), String.valueOf(hours), String.valueOf(dayOfMonth),
        "*/1", null);
intgetMonthOfDayMark(int day)
get Month Of Day Mark
return (day % 10000) / 100;
IntegergetNumberOfDaysInMonth(Integer year, Integer month)
get Number Of Days In Month
Integer result = null;
if (year != null && month != null) {
    if (month == 1) {
        result = 31;
    } else if (month == 2) {
        result = isLeapYear(year) ? 29 : 28;
    } else if (month == 3) {
        result = 31;
...
int[]getNumberOfDaysInMonthes(int theyear)
get Number Of Days In Monthes
return new int[] { 31, getLeapYear(theyear), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
intgetNumDaysInMonth(String monthID, String yearID)
get Num Days In Month
int returnVal = 31;
if (monthID != null) {
    int integerMonthID = (new Integer(monthID)).intValue();
    if ((integerMonthID == 3) || (integerMonthID == 5) || (integerMonthID == 8) || (integerMonthID == 10)) {
        returnVal = 30;
    } else if (integerMonthID == 1) {
        returnVal = 28;
        if (yearID != null) {
...