Created
March 9, 2012 08:24
-
-
Save notsobad/2005636 to your computer and use it in GitHub Desktop.
My js utils
This file contains hidden or 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 arrays_equal = function(a,b) { return a && b ? !(a<b || b<a) : false; } | |
| //var log = (window.console && console.log) || function(){}; | |
| var log=function(){ window.console && console.log && console.log.apply(console, arguments) } | |
| var n_day_ago= function(n){ | |
| var d = new Date(); | |
| d.setDate(d.getDate() - n); | |
| d.setHours(0); | |
| d.setMinutes(0); | |
| d.setSeconds(0); | |
| d.setMilliseconds(0); | |
| return d; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment