Java Utililty Methods Month Number Get

List of utility methods to do Month Number Get

Description

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

Method

intgetNumByStrMonth(String strMonth)
get Num By Str Month
if (strMonth.equals("January")) {
    return 1;
if (strMonth.equals("February")) {
    return 2;
if (strMonth.equals("March")) {
    return 3;
...
StringgetNumericMonthEquivalent(String s)
get Numeric Month Equivalent
if (s.equalsIgnoreCase("Jan"))
    return "01";
if (s.equalsIgnoreCase("Feb"))
    return "02";
if (s.equalsIgnoreCase("Mar"))
    return "03";
if (s.equalsIgnoreCase("Apr"))
    return "04";
...
StringmonthAdhToNumber(final String month)
month Adh To Number
if (month.equals("JAN")) {
    return "01";
if (month.equals("FEB")) {
    return "02";
if (month.equals("MAR")) {
    return "03";
...
intmonthNumber(int month)
month Number
switch (month) {
case 1:
    return Calendar.JANUARY;
case 2:
    return Calendar.FEBRUARY;
case 3:
    return Calendar.MARCH;
case 4:
...