Skip to content

Instantly share code, notes, and snippets.

View gawdeparag's full-sized avatar
👨‍💻

Parag Gawde gawdeparag

👨‍💻
View GitHub Profile
@miguelmota
miguelmota / randomDate.js
Last active October 9, 2024 22:10
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()))