Created
December 1, 2011 19:44
-
-
Save jgarber623/1419299 to your computer and use it in GitHub Desktop.
A couple of JS date utilities I used on a recent project
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
var date_utils = { | |
shift: function( date_obj, delta_in_days ) { | |
return new Date( date_obj.getTime() + ( delta_in_days * 86400000 ) ); | |
}, | |
epochTime: function( date_obj ) { | |
return date_obj.getTime(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment