Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created March 28, 2009 06:49
Show Gist options
  • Select an option

  • Save yosmoc/87039 to your computer and use it in GitHub Desktop.

Select an option

Save yosmoc/87039 to your computer and use it in GitHub Desktop.
function one_year_calender() {
var today = new Date().getTime();
var calender = [];
for (i = 1; i < 365; i++) {
add_time = i * 24 * 60 * 60 * 1000;
var new_date = new Date(today + add_time);
calender.push(new_date);
}
return calender;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment