Skip to content

Instantly share code, notes, and snippets.

@esayler
Last active October 9, 2016 19:04
Show Gist options
  • Save esayler/641d972ec71436cdd02d90320d206c0d to your computer and use it in GitHub Desktop.
Save esayler/641d972ec71436cdd02d90320d206c0d to your computer and use it in GitHub Desktop.
var Year = function(input) {
this.input = input;
};
Year.prototype.isLeap = function() {
if (this.input % 4 === 0) {
if (this.input % 100 === 0) {
if (this.input % 400 === 0) {
return true;
} else {
return false;
}
} else {
return true;
}
} else {
return false;
}
};
module.exports = Year;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment