Java Month of Year getMonthHaveDays(int year, int month)

Here you can find the source of getMonthHaveDays(int year, int month)

Description

get Month Have Days

License

Open Source License

Declaration

public static int getMonthHaveDays(int year, int month) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {

    public static int getMonthHaveDays(int year, int month) {
        Calendar cal = Calendar.getInstance();
        cal.set(year, month - 1, 1);//  www  .  ja va2  s.  com
        return cal.getActualMaximum(Calendar.DATE);
    }
}

Related

  1. getLastMonthOfQuater(Date date)
  2. getLastMonthOfYear()
  3. getMaxDayOfMonth(int year, int month)
  4. getMonth(int week, int year)
  5. getMonthDays(Object year, Object month)
  6. getMonthOfYear(int m)
  7. getMonthOfYear(long time)
  8. getMonthOfYearFromTimestamp(long ms)
  9. getMonthStart(int year, int month)