I'm trying to use following function (taken from an another answer) to get a random time that's > from now and within a hourly range.
I don't know exact value I need to put into startHour
My time is 4 PM EST US and I put 16 there and 5 to the hourRange
but it gives me values that's less than that.
function randomTime(rangeOfDays = 0, startHour, hourRange){
var today = new Date(Date.now());
return new Date(today.getYear()+1900,today.getMonth(), today.getDate()+Math.random() *rangeOfDays, Math.random()*hourRange + startHour, Math.random()*60)
}
Link to that answer, Answer