Java Month getEnligthMonth(String en)

Here you can find the source of getEnligthMonth(String en)

Description

get Enligth Month

License

Open Source License

Declaration

public static int getEnligthMonth(String en) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int getEnligthMonth(String en) {//en = Jan
        int m = 0;
        en = en.toLowerCase();// w  w w  .jav a 2s .  c  o  m
        if ("january".indexOf(en) != -1) {
            m = 1;
        } else if ("february".indexOf(en) != -1) {
            m = 2;
        } else if ("march".indexOf(en) != -1) {
            m = 3;
        } else if ("april".indexOf(en) != -1) {
            m = 4;
        } else if ("may".indexOf(en) != -1) {
            m = 5;
        } else if ("june".indexOf(en) != -1) {
            m = 6;
        } else if ("july".indexOf(en) != -1) {
            m = 7;
        } else if ("august".indexOf(en) != -1) {
            m = 8;
        } else if ("september".indexOf(en) != -1) {
            m = 9;
        } else if ("october".indexOf(en) != -1) {
            m = 10;
        } else if ("november".indexOf(en) != -1) {
            m = 11;
        } else if ("december".indexOf(en) != -1) {
            m = 12;
        }
        return m;
    }
}

Related

  1. fixMonth(int month)
  2. fixMonth(String m)
  3. getAllowMonth(String startdate, int count)
  4. getAssignMonth(String date)
  5. getCurrDateByMonth(String date)
  6. getEnMonth(String month)
  7. getFirstMonthByQuarter(int month)
  8. getFirstMonthOfQuarter(String quarter)
  9. getFiscalMonth(int month, int fiscalMonthOffset)