Here you can find the source of isLeapYear(long year)
Parameter | Description |
---|---|
year | The year to test |
public static boolean isLeapYear(long year)
//package com.java2s; //License from project: Open Source License public class Main { /**//ww w . jav a 2 s. c o m * Gets if a year is a leap year * * @param year The year to test * @return If a year is a leap year */ public static boolean isLeapYear(long year) { return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); } }