Java Month Get getMonthAndDate()

Here you can find the source of getMonthAndDate()

Description

get Month And Date

License

Apache License

Return

MM-dd

Declaration

public static String getMonthAndDate() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;

public class Main {
    /**//ww  w . jav a2s.c  o m
     * MM-dd Comment for <code>onlyDateFmt</code>
     */
    public static final SimpleDateFormat mmDDDateFmt = new SimpleDateFormat("MMdd", Locale.CHINA);

    /**
     * @return MM-dd
     */
    public static String getMonthAndDate() {
        return mmDDDateFmt.format(new Date());
    }
}

Related

  1. getMonth(String strDate)
  2. getMonth(String strDate)
  3. getMonth(String tempdat, Locale locale)
  4. getMonth1D()
  5. getMonthAdd(String operateDate, int flag)
  6. getMonthBefore(Date d, int number)
  7. getMonthBegin(String strdate)
  8. getMonthBegin(String strdate)
  9. getMonthByNow(int month)