Node.js examples for Date:Year
Date is Leap year
Date.prototype.isLeap = function() { var y = this.getFullYear(); if (y % 4 != 0) { return false; } else if (y % 400 == 0) { return true; } else if (y % 100 == 0) { return false; } else {//ww w . ja v a2s.c om return true; } };