getRunDates() public static method

Returns next run dates for time expression
public static getRunDates ( string $time, integer $count = 10 ) : array
$time string
$count integer
return array
 public function getDates()
 {
     $time = $_POST['time'];
     $dates = TaskRunner::getRunDates($time);
     if (empty($dates)) {
         echo 'Invalid expression';
         return;
     }
     echo '<ul>';
     foreach ($dates as $d) {
         /**
          * @var \DateTime $d
          */
         echo '<li>' . $d->format('Y-m-d H:i:s') . '</li>';
     }
     echo '</ul>';
 }
 public function testGetRunDatesException()
 {
     $result = TaskRunner::getRunDates('wrong expression');
     $this->assertTrue(is_array($result));
     $this->assertEquals(0, count($result));
 }