Java Date to Month getMonthOfCurrentTime(Date date)

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

Description

get Month Of Current Time

License

Open Source License

Declaration

public static Integer getMonthOfCurrentTime(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Integer getMonthOfCurrentTime(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);//from  w w w  . j  a  v  a 2s.co  m
        return calendar.get(Calendar.MONTH) + 1;
    }
}

Related

  1. getMonthInterval(Date _one, Date _two)
  2. getMonthLastDate(Date date)
  3. getMonthLastDay(Date date)
  4. getMonthlyKey(Date d)
  5. getMonthName(Date date)
  6. getMonthOffset(Date sourceDate, Date targetDate)
  7. getMonthOfThisYear(Date currentdate)
  8. getMonthOfYear(Date date)
  9. getMonthOfYear(Date dt)