Code example for DateFormatSymbols

Methods: getMonths

0
     
    public static String getMonthFromString(String in) {
        String month = "invalid";
        int m = Integer.parseInt(in);
        m--;
        DateFormatSymbols dfs = new DateFormatSymbols();
        String[] months = dfs.getMonths();
        if (m >= 0 && m <= 11 ) {
            month = months[m];
        } 
        return month;
    } 
     
    public static String monthFromDateString(String d) { 
        String date_pieces[] = d.split("[-T]"); 
        return date_pieces[1]; 
    } 
     
    public static String dayFromDateString(String d) { 
        String date_pieces[] = d.split("[-T]"); 
Connect your IDE to all the code out there  Get Codota for Java