Java Month parseMonth(final int month)

Here you can find the source of parseMonth(final int month)

Description

Parse month number to string.

License

Open Source License

Parameter

Parameter Description
month Month number.

Return

Month as string.

Declaration

private static String parseMonth(final int month) 

Method Source Code

//package com.java2s;

public class Main {
    /**// w  ww .  j av  a 2s . c o  m
     * Parse month number to string.
     * 
     * @param month
     *            Month number.
     * @return Month as string.
     */
    private static String parseMonth(final int month) {
        String monthString = "";
        switch (month) {
        case 0:
            monthString = "Enero";
            break;
        case 1:
            monthString = "Febrero";
            break;
        case 2:
            monthString = "Marzo";
            break;
        case 3:
            monthString = "Abril";
            break;
        case 4:
            monthString = "Mayo";
            break;
        case 5:
            monthString = "Junio";
            break;
        case 6:
            monthString = "Julio";
            break;
        case 7:
            monthString = "Agosto";
            break;
        case 8:
            monthString = "Septiembre";
            break;
        case 9:
            monthString = "Octubre";
            break;
        case 10:
            monthString = "Noviembre";
            break;
        case 11:
            monthString = "Diciembre";
            break;
        default:
            break;
        }
        return monthString;
    }
}

Related

  1. nextMonth(String s)
  2. nextMonthIndex(int current, int step)
  3. normalizeMonth(final int month)
  4. normalizeMonth(String word)
  5. paraseMonth(String yearMonth)
  6. ResolveMonth(String MonthToResolve)
  7. returnMonth(String month)
  8. roundMonthUnits(final int defaultUnitValue)
  9. setStatis_month(String year_month)