Skip to content

Instantly share code, notes, and snippets.

@mixu
Created December 28, 2013 21:52
Show Gist options
  • Save mixu/8164690 to your computer and use it in GitHub Desktop.
Save mixu/8164690 to your computer and use it in GitHub Desktop.
evil global very helping such expressive wow
// evil global
// very helping
// such expressive
// wow
Number.prototype.days = function() {
var i = this;
return {
from_now: function() {
var d = new Date();
d.setDate(d.getDate() + i);
return d;
}
};
};
// (2).days().from_now()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment