Created
May 16, 2015 13:32
-
-
Save harabchuk/71a4258c43a80353c70d to your computer and use it in GitHub Desktop.
Add hours to JavaScript date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date.prototype.addHours = function(h) { | |
this.setTime(this.getTime() + (h*60*60*1000)); | |
return this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment