Here you can find the source of daysInFebruary(int year)
public static int daysInFebruary(int year)
//package com.java2s; public class Main { /** Given integer argument year, returns number of days in February of that year. */ public static int daysInFebruary(int year) { // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. return (((year % 4 == 0) && ((!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28); }/*from w ww .j a v a 2 s .c o m*/ }