Java Date to Month getMonth(Date aDate)

Here you can find the source of getMonth(Date aDate)

Description

get Month

License

Open Source License

Declaration

public static Integer getMonth(Date aDate) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {

    public static Integer getMonth(Date aDate) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(aDate);/*w  ww  .  java 2s. co  m*/
        return new Integer(cal.get(Calendar.MONTH) + 1);
    }
}

Related

  1. getMonday(Date date)
  2. getMondayDate(String date)
  3. getMontByDate(Date curDate)
  4. getMonth(Date d)
  5. getMonth(Date d)
  6. getMonth(Date d)
  7. getMonth(Date d)