Skip to content

Instantly share code, notes, and snippets.

@jsvnm
Created November 12, 2012 13:55
Show Gist options
  • Save jsvnm/4059527 to your computer and use it in GitHub Desktop.
Save jsvnm/4059527 to your computer and use it in GitHub Desktop.
getting a date range strign fr githubsearch
function fm(d){return [d.getFullYear(), d.getMonth()+1, d.getDate()].join('-');}
function rn(a,d){var b=new Date();b.setDate(a.getDate()+d);var ds=[a,b].sort();return " pushed:["+fm(ds[0])+" TO "+fm(ds[1])+"]";}
function se(s,d){window.location="https://github.com/search?type=Repositories&q="+s+rn(new Date(),d);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment