Created
September 29, 2016 15:03
-
-
Save Zyst/2088fd3063f8f2ce2c7e959db75adf6f to your computer and use it in GitHub Desktop.
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
// Subtracts the number of days to a Date and returns it | |
Date.prototype.subtractDays = function(days) { | |
var dat = new Date(this.valueOf()); | |
dat.setDate(dat.getDate() - days); | |
return dat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment