Salve, ho uno script realizzato in php, ora vorrei convertirlo in js, potete darmi una mano o magari indirizzarmi.

Posto il codice:

Codice PHP:
//$aDate = '2016-08-20';
$rounds = array('s''p''m''n''r');
$aDate date("Y-m-d"strtotime('-1 day'strtotime($aDate)));
$events = array();// Calcolo di 2 anni = 730for($i=0; $i<730; $i++) {
$random rand(1,1000);
$nextDate date("Y-m-d"strtotime('+1 day'strtotime($aDate)));
$event_array[] = array(
    
'id' => $random,
    
'title' => $rounds[$i%count($rounds)],
    
'start' => $nextDate."T23:59:00",
    
'tipo' => 't5'
    
);
$aDate $nextDate;}//echo json_encode($event_array); 
Grazie mille.