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

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

Description

days In Month

License

Open Source License

Declaration

private static int daysInMonth(int year, int month) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.GregorianCalendar;

public class Main {
    private static int daysInMonth(int year, int month) {
        Calendar mycal = new GregorianCalendar(year, month - 1, 1);
        return mycal.getActualMaximum(Calendar.DAY_OF_MONTH);
    }// ww  w  . ja v a2  s  . c  o m
}

Related

  1. daysInMonth(final int month, final int year)
  2. daysInMonth(final int year, final int month)
  3. daysInMonth(int month, int year)
  4. daysInMonth(int month, int year)
  5. daysInMonth(int year, int month)
  6. get_NextSunday_YearMonthDay_integerArray()
  7. getActualMonthBefore(int year, int month, int i)
  8. getCalforMonth(String month, String year)
  9. getDaysByYearMonth(int year, int month)