Java Month Name Get getMonthStr(int month)

Here you can find the source of getMonthStr(int month)

Description

get Month Str

License

Apache License

Declaration


public static String getMonthStr(int month) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String getMonthStr(int month) {
        String monthInChinese = "";
        switch (month) {
        case 1: // '\001'
            monthInChinese = "\u4E00\u6708";
            break;

        case 2: // '\002'
            monthInChinese = "\u4E8C\u6708";
            break;

        case 3: // '\003'
            monthInChinese = "\u4E09\u6708";
            break;

        case 4: // '\004'
            monthInChinese = "\u56DB\u6708";
            break;

        case 5: // '\005'
            monthInChinese = "\u4E94\u6708";
            break;

        case 6: // '\006'
            monthInChinese = "\u516D\u6708";
            break;

        case 7: // '\007'
            monthInChinese = "\u4E03\u6708";
            break;

        case 8: // '\b'
            monthInChinese = "\u516B\u6708";
            break;

        case 9: // '\t'
            monthInChinese = "\u4E5D\u6708";
            break;

        case 10: // '\n'
            monthInChinese = "\u5341\u6708";
            break;

        case 11: // '\013'
            monthInChinese = "\u5341\u4E00\u6708";
            break;

        case 12: // '\f'
            monthInChinese = "\u5341\u4E8C\u6708";
            break;
        }/*from   w w w  .j  a  v a  2 s .co  m*/
        return monthInChinese;
    }
}

Related

  1. getMonthName(String dateString)
  2. getMonthName(String month)
  3. getMonthNames(Locale locale)
  4. getMonthNames(Locale locale)
  5. getMonthSelect(String selectName, String value, boolean hasBlank)
  6. getMonthStr(int month)
  7. getMonthStr(String str)
  8. getMonthString(int month)
  9. getPreMonthText(String pattern)