Skip to content

Instantly share code, notes, and snippets.

@drazik
Created April 7, 2021 19:48
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 drazik/2b5298c0f2c848b1a59c5bf360598fe1 to your computer and use it in GitHub Desktop.
Save drazik/2b5298c0f2c848b1a59c5bf360598fe1 to your computer and use it in GitHub Desktop.
random dates
Array.from({ length: 366 }).map((_, i) => i +1).sort(() => Math.random() - 0.5).map((n) => { const date = new Date(2020, 0); return new Date(date.setDate(n)).toISOString().slice(0,10)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment