Java Month findMonth(String strMonth)

Here you can find the source of findMonth(String strMonth)

Description

Method findMonth.

License

Open Source License

Parameter

Parameter Description
strMonth String

Return

String

Declaration

public static String findMonth(String strMonth) 

Method Source Code

//package com.java2s;
/*//from  ww  w. ja v a 2  s  . c  om
 * iDART: The Intelligent Dispensing of Antiretroviral Treatment
 * Copyright (C) 2006 Cell-Life
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version
 * 2 for more details.
 *
 * You should have received a copy of the GNU General Public License version 2
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

public class Main {
    /**
     * Method findMonth.
     * 
     * @param strMonth
     *            String
     * @return String
     */
    public static String findMonth(String strMonth) {

        String month = "";
        if (strMonth.equals("01")) {
            month = "January";
        } else if (strMonth.equals("02")) {
            month = "February";
        } else if (strMonth.equals("03")) {
            month = "March";
        } else if (strMonth.equals("04")) {
            month = "April";
        } else if (strMonth.equals("05")) {
            month = "May";
        } else if (strMonth.equals("06")) {
            month = "June";
        } else if (strMonth.equals("07")) {
            month = "July";
        } else if (strMonth.equals("08")) {
            month = "August";
        } else if (strMonth.equals("09")) {
            month = "September";
        } else if (strMonth.equals("10")) {
            month = "October";
        } else if (strMonth.equals("11")) {
            month = "November";
        } else if (strMonth.equals("12")) {
            month = "December";
        }

        return month;

    }
}

Related

  1. createTestCCMonth()
  2. daemonThread(Runnable runnable)
  3. displayMonthlyPeriod(String week)
  4. doy2month(int year, int doy)
  5. extractMonthFromDate(String dateString)
  6. fixMonth(int month)
  7. fixMonth(String m)
  8. getAllowMonth(String startdate, int count)
  9. getAssignMonth(String date)