Java Date Now getCurrentMonth()

Here you can find the source of getCurrentMonth()

Description

get Current Month

License

Open Source License

Declaration

public static String getCurrentMonth() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getCurrentMonth() {
        return getFormatCurrentTime("MM");
    }//from  ww w .  j  a v a  2s .  c  o m

    public static String getFormatCurrentTime(String format) {
        return getFormatDateTime(new Date(), format);
    }

    public static String getFormatDateTime(Date date, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}

Related

  1. getCurrentLastDate()
  2. getCurrentLocaleTime()
  3. getCurrentMinutes()
  4. getCurrentMonth()
  5. getCurrentMonth()
  6. getCurrentMonth(boolean bool, String currentDate)
  7. getCurrentMonthday()
  8. getCurrentMonthLastDay()
  9. getCurrentMonthStartTime()