Skip to content

Instantly share code, notes, and snippets.

@ericdouglas
Created January 17, 2018 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericdouglas/f5352460d877e83fb9cd364a97e43c51 to your computer and use it in GitHub Desktop.
Save ericdouglas/f5352460d877e83fb9cd364a97e43c51 to your computer and use it in GitHub Desktop.
Review system generator/scheduler
const today = new Date().getTime();
const day = 24 * 60 * 60 * 1000; // 1 day in miliseconds
console.log('TODAY', (new Date(today)).toISOString().split('T')[0]);
console.log('+1', (new Date(today + (day * 1))).toISOString().split('T')[0]);
console.log('+3', (new Date(today + (day * 3))).toISOString().split('T')[0]);
console.log('+7', (new Date(today + (day * 7))).toISOString().split('T')[0]);
console.log('+15', (new Date(today + (day * 15))).toISOString().split('T')[0]);
console.log('+30', (new Date(today + (day * 30))).toISOString().split('T')[0]);
console.log('+60', (new Date(today + (day * 60))).toISOString().split('T')[0]);
console.log('+120', (new Date(today + (day * 120))).toISOString().split('T')[0]);
console.log('+240', (new Date(today + (day * 240))).toISOString().split('T')[0]);
console.log('+365', (new Date(today + (day * 365))).toISOString().split('T')[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment