Java Year Month getMonthDays(Integer year, Integer month)

Here you can find the source of getMonthDays(Integer year, Integer month)

Description

get Month Days

License

Apache License

Declaration

public static int getMonthDays(Integer year, Integer month) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {

    public static int getMonthDays(Integer year, Integer month) {
        Calendar c = Calendar.getInstance();
        c.set(year, month - 1, 1);//from w ww.  jav a2  s. c  om
        return c.getActualMaximum(Calendar.DAY_OF_MONTH);
    }
}

Related

  1. getFirstDayOfMonth(int year, int month)
  2. getFirstDayOfMonth(int year, int month, Integer day)
  3. getFirstTimeOfDay(int year, int month, int day)
  4. getFirstYearMonth()
  5. getMonthDays(Integer year, Integer month)
  6. getPerMonthByCuttentYear()
  7. getQuarterToYearMonthDay(Integer year, Integer quarter)
  8. getStartMonth(int year, int month)
  9. getTheLastDayOfTheMonth(int year, int month)