Java Month Get getMonthPath(Date date)

Here you can find the source of getMonthPath(Date date)

Description

get Month Path

License

Open Source License

Declaration

public static String getMonthPath(Date date) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String MONTH_FORMAT_DATEPATH = "yyyy/MM";

    public static String getMonthPath(Date date) {
        return new SimpleDateFormat(MONTH_FORMAT_DATEPATH).format(date);
    }/* w w  w  .  j ava 2  s.c  om*/

    public static String format(Date date, String format) {
        return date != null ? new SimpleDateFormat(format).format(date).toString() : "";
    }
}

Related

  1. getMonthInfo(int monthInfo)
  2. getMonthLength(String countDate)
  3. getMonthNo(Date date)
  4. getMonthNumber()
  5. getMonthOfSeason(Date date, boolean firstOrLast)
  6. getMonthRange(String strBeginDate, String strEndDate, String pattern)
  7. getMonths()
  8. getMonths(DateFormatSymbols symbols)
  9. getMonthSpace(Date date)