Skip to content

Instantly share code, notes, and snippets.

@akira1908jp
Created March 5, 2014 09:03
Show Gist options
  • Save akira1908jp/9363699 to your computer and use it in GitHub Desktop.
Save akira1908jp/9363699 to your computer and use it in GitHub Desktop.
add hours and add minutes chain function
Date.prototype.addHours= function(h){
this.setHours(this.getHours()+h);
return this;
}
Date.prototype.addMinitues= function(m){
this.setHours(this.getMinitues()+m);
return this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment