Java Month Get getMonth(Date date)

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

Description

get Month

License

Open Source License

Declaration

public static int getMonth(Date date) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {
    public static int getMonth(Date date) {
        return getCalendar(date).get(Calendar.MONTH) + 1;
    }/*from   w w  w . jav  a  2 s .  co  m*/

    public static Calendar getCalendar(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar;
    }
}

Related

  1. getMonth()
  2. getMonth(Date d)
  3. getMonth(Date date)
  4. getMonth(Date date)
  5. getMonth(Date date)
  6. getMonth(Date date)
  7. getMonth(Date date)
  8. getMonth(Date date)
  9. getMonth(Date date)