Skip to content

Instantly share code, notes, and snippets.

View LeandrodeLimaC's full-sized avatar
🎯
Focusing

Leandro de Lima LeandrodeLimaC

🎯
Focusing
View GitHub Profile
@LeandrodeLimaC
LeandrodeLimaC / random-date.js
Created December 21, 2020 16:00 — forked from miguelmota/randomDate.js
Random date in JavaScript
function randomDate(start, end) {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
}
console.log(randomDate(new Date(2012, 0, 1), new Date()));

Keybase proof

I hereby claim:

  • I am leandrodelimac on github.
  • I am leandrodelimac (https://keybase.io/leandrodelimac) on keybase.
  • I have a public key ASDLQC_VNwlvdwlL4NKU6ZBS8iGxo3axWl-HNRk-gFa63Qo

To claim this, I am signing this object: