Leap Years

CSS

/*
http://stackoverflow.com/questions/16353211/check-if-year-is-leap-year-in-javascript
see also:
http://www.codeproject.com/Articles/28837/Calculating-Duration-Between-Two-Dates-in-Years-Mo
http://stackoverflow.com/questions/12251325/javascript-date-to-calculate-age-work-by-the-day-months-years
http://stackoverflow.com/questions/16435981/age-leap-year-calculation-in-javascript
*/

JavaScript

function isleap(myvalue) {
	var year = myvalue;

 	if ( ( year % 4 ) == 0) {
		if ( (year % 100) == 0 ) {
			if ( (year % 400) == 0 ) {	
				return 'true';
			} else {	
				return 'false';			
			}
		}	
		return 'true';
	}	
	return 'false';
}

var lY = isLeap(2015);

alert(lY);