Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

generate random date

function getRandomDate() {
    const maxDate = Date.now();
    const timestamp = Math.floor(Math.random() * maxDate);
    return new Date(timestamp);
}

console.log(getRandomDate());
Source by javascriptf1.com #
 
PREVIOUS NEXT
Tagged: #generate #random #date
ADD COMMENT
Topic
Name
7+5 =