JavaScript menghasilkan nomor acak berdasarkan tanggal
var NiceRandomNumber = Date.now() + Math.random();
L'homme habile
var NiceRandomNumber = Date.now() + Math.random();
function randomDate(start, end) {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
}
randomDate(new Date(2012, 0, 1), new Date())
randomDate(new Date(2012, 0, 1), new Date())