Java Month getMonthFromYM(String ym)

Here you can find the source of getMonthFromYM(String ym)

Description

get Month From YM

License

Open Source License

Declaration

public static String getMonthFromYM(String ym) 

Method Source Code

//package com.java2s;

public class Main {
    public static final String DEFAULT_DATE_YM_FORMAT = "yyyyMM";

    public static String getMonthFromYM(String ym) {

        if (ym == null || ym.length() != DEFAULT_DATE_YM_FORMAT.length()) {
            return null;
        }//from   w  ww  . jav a  2 s. c  om

        return ym.substring(4, 6);
    }
}

Related

  1. getMonthCountByBillMode(String billMode)
  2. getMonthDescription(int month)
  3. getMonthDiff(String startDate, String endDate)
  4. getMonthEnd(String strdate)
  5. getMonthFromDate(String date)
  6. getMonthInEnglish(int month)
  7. getMonthLastDate(int month, int year)
  8. getMonthLength(final int year, final int month)
  9. getMonthLength(int year, int m)