Java Month yyyymm2month(String yyyymm)

Here you can find the source of yyyymm2month(String yyyymm)

Description

yyyymmmonth

License

Open Source License

Declaration

public static String yyyymm2month(String yyyymm) 

Method Source Code

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

public class Main {
    private static final String[][] mapping = new String[][] {
            { "01", "jan" }, { "02", "feb" }, { "03", "mar" },
            { "04", "apr" }, { "05", "maj" }, { "06", "jun" },
            { "07", "jul" }, { "08", "aug" }, { "09", "sep" },
            { "10", "okt" }, { "11", "nov" }, { "12", "dec" } };

    public static String yyyymm2month(String yyyymm) {
        String month = yyyymm.substring(5);
        for (int i = 0; i < mapping.length; i++) {
            if (mapping[i][0].equals(month)) {
                return mapping[i][1];
            }/*from   w w w. ja v a  2 s  .  c om*/
        }
        return yyyymm;
    }
}

Related

  1. stringToMonth(String m)
  2. toAnotherMonthColor(String value, String type)
  3. toCalendarMonth(int month)
  4. toMonths(int years, int months)
  5. validateMonth(int month)