Java Year Month getYearMonthStr(Date parseDate)

Here you can find the source of getYearMonthStr(Date parseDate)

Description

get Year Month Str

License

Open Source License

Declaration

public static String getYearMonthStr(Date parseDate) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final String YYYYMMINTFORMAT = "yyyyMM";

    public static String getYearMonthStr(Date parseDate) {
        return formatStr(parseDate, YYYYMMINTFORMAT);
    }//from   w w w  .  ja  v  a  2  s .  c o  m

    public static String formatStr(Date date, String dateFormat) {
        return new SimpleDateFormat(dateFormat).format(date).toString();
    }
}

Related

  1. getYearMonthDay()
  2. getYearMonthDay(Date date)
  3. getYearMonthDay(final int year, final int month, final int day)
  4. getYearMonthList(int year)
  5. getYearMonths(List time)
  6. getYearMonthString(Date date)
  7. lastDay(int year, int month)
  8. makeDate(int day, int month, int year, int hour, int min, int sec)
  9. monthBeginDate(int year, int month)