Java Utililty Methods Month

List of utility methods to do Month

  1. HOME
  2. Java
  3. M
  4. Month

Description

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

Method

int addMonthMark(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;
...
String addMonthString(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++;
...
int adjustWeekOfMonth(int eventWeekOfMonth, int eventRealWeekOfMonth)
adjust Week Of Month
if (eventWeekOfMonth > 1 && eventWeekOfMonth > eventRealWeekOfMonth) {
 return eventWeekOfMonth - 1;
return eventWeekOfMonth;
double calculateMonthlyNominalInterestRate(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;
void checkMonth(int month)
Prueft, ob sich der Monat innerhalb des erlaubten Bereichs befindet.
if (month < 1 || month > 12) {
 throw new NumberFormatException();
String createDateMonth(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);
...
String createTestCCMonth()
create Test CC Month
return "11";
Thread daemonThread(Runnable runnable)
Create a daemon thread
return newThread(runnable, true);
String displayMonthlyPeriod(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();
int doy2month(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) {
...


AltStyle によって変換されたページ (->オリジナル) /