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

intaddMonthMark(int month, int add)
add Month Mark
int m = month % 100 + add;
if (m > 0 && m <= 12) {
    return month + add;
int y = month / 100;
int totalMonth = y * 12 + m - 1;
y = totalMonth / 12;
m = totalMonth - y * 12 + 1;
...
StringaddMonthString(String yyyymm)
add Month String
String yy = yyyymm.substring(0, 4);
String mm = yyyymm.substring(4);
int mm_plus_1 = Integer.parseInt(mm);
int iYY = Integer.parseInt(yy);
mm_plus_1++;
if (mm_plus_1 > 12) {
    mm_plus_1 = 1;
    iYY++;
...
intadjustWeekOfMonth(int eventWeekOfMonth, int eventRealWeekOfMonth)
adjust Week Of Month
if (eventWeekOfMonth > 1 && eventWeekOfMonth > eventRealWeekOfMonth) {
    return eventWeekOfMonth - 1;
return eventWeekOfMonth;
doublecalculateMonthlyNominalInterestRate(final double effectiveInterestRate)
Calculates the monthly nominal interest rate for a given effective yearly interest rate.

http://en.wikipedia.org/wiki/Effective_interest_rate
return effectiveInterestRate / (1 + ((11 / 24) * effectiveInterestRate)) / 12;
voidcheckMonth(int month)
Prueft, ob sich der Monat innerhalb des erlaubten Bereichs befindet.
if (month < 1 || month > 12) {
    throw new NumberFormatException();
StringcreateDateMonth(String dateYear)
create Date Month
try {
    String dateDay = dateYear.replace("y", ""); 
    if (dateDay.length() == 0)
        return dateDay;
    String firstLetter = dateDay.substring(0, 1);
    while (dateDay.length() > 0 && !isPatternChar(firstLetter)) {
        dateDay = dateDay.substring(1);
        firstLetter = dateDay.substring(0, 1);
...
StringcreateTestCCMonth()
create Test CC Month
return "11";
ThreaddaemonThread(Runnable runnable)
Create a daemon thread
return newThread(runnable, true);
StringdisplayMonthlyPeriod(String week)
display Monthly Period
String[] monthNames = { "January", "February", "March", "April", "May", "June", "July", "August",
        "September", "October", "November", "December" };
StringBuffer displayPeriod = new StringBuffer();
displayPeriod.append(monthNames[Integer.parseInt(week.substring(0, week.indexOf('-')))] + " ");
displayPeriod.append(week.substring(week.lastIndexOf('-') + 1));
return displayPeriod.toString();
intdoy2month(int year, int doy)
Compute the month from day of year.
int[] regu_month_day = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 };
int[] leap_month_day = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 };
int yday = 0;
int month = 0;
int mday = 0;
int guess = (int) (doy * 0.032);
int more = 0;
if ((year % 4) == 0) {
...