Java Leap Year Check isLeapYear(int year)

Here you can find the source of isLeapYear(int year)

Description

is Leap Year

License

Apache License

Declaration

public static boolean isLeapYear(int year) 

Method Source Code

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

public class Main {
    private static transient int gregoranCutoverYear = 1582;

    public static boolean isLeapYear(int year) {
        return year >= gregoranCutoverYear ? ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)))
                : (year % 4 == 0);//from www  .j  a v a 2 s .  co m
    }
}

Related

  1. isLeapYear(int year)
  2. isLeapYear(int year)
  3. isLeapYear(int year)
  4. isLeapYear(int year)
  5. isLeapYear(int year)
  6. isLeapYear(int year)
  7. isLeapYear(int year)
  8. isLeapYear(int year)
  9. isLeapYear(int year)