Android Year Leap Check is_leap_year(int year)

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

Description

ileayear

Declaration

public static boolean is_leap_year(int year) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean is_leap_year(int year) {
        boolean result;

        if ((year % 4) != 0)
            result = false;/*from   w w w  . ja v a2  s .co m*/
        else if ((year % 400) == 0)
            result = true;
        else if ((year % 100) == 0)
            result = false;
        else
            result = true;

        return result;
    }
}

Related

  1. isLeap(int year)
  2. isLeapYear(int year)
  3. isLeapYear(int year)
  4. isLeapYear(int year)