Java Day From days(int month, int year)

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

Description

days

License

LGPL

Declaration

public static int days(int month, int year) 

Method Source Code

//package com.java2s;
// http://www.gnu.org/licenses/lgpl-3.0-standalone.html

public class Main {
    public static int days(int month, int year) {
        if (month == 2)
            return 28 + ((year % 4 == 0) ? 1 : 0) - ((year % 4 == 100) ? 1 : 0);
        if (month < 8)
            return 30 + (month % 2);
        return 31 - (month % 2);
    }//from  www.j av  a 2  s . c  o  m
}

Related

  1. createInDays(final Date from, final int amount)
  2. day(Integer time)
  3. dayFromDateValue(long x)
  4. dayNumberToTimestamp(short dateNumber)
  5. days(int d)
  6. days(int num)
  7. days(int year, int month)
  8. daysAfter(Date earlierDate, Date laterDate)
  9. daysAndHours(int hours)