Android Month Date Get getCurrentMonth()

Here you can find the source of getCurrentMonth()

Description

get Current Month

Declaration

public static int getCurrentMonth() 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
    private static final Calendar CALENDAR = new GregorianCalendar();

    public static int getCurrentMonth() {
        CALENDAR.setTime(new Date());
        return CALENDAR.get(Calendar.MONTH) + 1;
    }/*from  ww  w.  ja  v  a 2 s.c o m*/
}

Related

  1. getCurrentMonth()
  2. monthNumber()
  3. getInterval(String beginMonth, String endMonth)
  4. monthOffset(Date date, int offset)
  5. getMonth()
  6. getStringMonth(Date date)
  7. getMonth(int month, Locale locale)
  8. getMonthName(String substring)
  9. getEndCurrentMonth()