In PHP è semplice creare una data casuale.
La soluzione è la seguente:
function create_rand_date($start_date = '2000-01-01') {
$timestamp = mt_rand(strtotime($start_date), time());
return strftime('%Y-%m-%d', $timestamp);
}
In PHP è semplice creare una data casuale.
La soluzione è la seguente:
function create_rand_date($start_date = '2000-01-01') {
$timestamp = mt_rand(strtotime($start_date), time());
return strftime('%Y-%m-%d', $timestamp);
}