/ Published in: JavaScript

Extend Date object to have isLeapYear() boolean (true for Leap Years)
Taken from https://raw.github.com/vitch/jquery-methods/master/date.js
Taken from https://raw.github.com/vitch/jquery-methods/master/date.js
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Date.prototype.isLeapYear = function() { var y = this.getFullYear(); return (y%4==0 && y%100!=0) || y%400==0; };
URL: http://www.tomasdev.com.ar
Comments
