Java Date to Month getMonth(java.util.Date date)

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

Description

get Month

License

Open Source License

Declaration

public static int getMonth(java.util.Date date) 

Method Source Code

//package com.java2s;

public class Main {

    public static int getMonth(java.util.Date date) {
        java.util.Calendar c = java.util.Calendar.getInstance();

        c.setTime(date);/*from  w w  w  . j  av a 2  s  .  co m*/

        return c.get(java.util.Calendar.MONTH) + 1;

    }
}

Related

  1. getMonth(Date date)
  2. getMonth(Date date)
  3. getMonth(Date date)
  4. getMonth(Date dateParam)
  5. getMonth(Date... objects)
  6. getMonth(java.util.Date date)
  7. getMonth(java.util.Date date)
  8. getMonth(java.util.Date today)
  9. getMonth(long date, int increment)