Java Leap Year Check getLeapYear(int theyear)

Here you can find the source of getLeapYear(int theyear)

Description

get Leap Year

License

Open Source License

Declaration

private static int getLeapYear(int theyear) 

Method Source Code

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

public class Main {
    private static int getLeapYear(int theyear) {
        return ((theyear % 4 == 0 && theyear % 100 != 0) || theyear % 400 == 0) ? 29 : 28;
    }//from   w w  w  . j  a  v a 2  s .c  o  m
}

Related

  1. getMonthOfYear(int dayOfYear, boolean leap)
  2. isGregorianLeapYear(int gregorianYear)
  3. isGregorianLeapYear(int gregorianYear)
  4. isJalaliLeapYear(int year)