Return to Snippet

Revision: 47684
at June 13, 2011 23:52 by tomasdev


Initial Code
Date.prototype.isLeapYear = function() {
	var y = this.getFullYear();
	return (y%4==0 && y%100!=0) || y%400==0;
};

Initial URL
http://www.tomasdev.com.ar

Initial Description
Extend Date object to have isLeapYear() boolean (true for Leap Years)
Taken from https://raw.github.com/vitch/jquery-methods/master/date.js

Initial Title
Leap Year Check

Initial Tags
javascript, date

Initial Language
JavaScript