Android Month Date Get monthNumber()

Here you can find the source of monthNumber()

Description

month Number

License

Open Source License

Declaration

public static int monthNumber() 

Method Source Code

//package com.java2s;

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

public class Main {
    public static int monthNumber(Date date) {
        Calendar calendar = calendarDate(date);
        return calendar.get(Calendar.MONTH);
    }/*from  www  . j  a v a  2  s  .  co  m*/

    public static int monthNumber() {
        return monthNumber(new Date());
    }

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

Related

  1. monthNumber(Date date)
  2. maxMonthDate(Date date)
  3. getMonthStartDate(Date date)
  4. getMonthEndDate(Date date)
  5. getCurrentMonth()
  6. getInterval(String beginMonth, String endMonth)
  7. monthOffset(Date date, int offset)
  8. getMonth()
  9. getCurrentMonth()