Get next or previous runtime of a cronjob by its pattern

Code
<?php

use Cron\CronExpression;

$cron CronExpression::factory('0 12 1-9 * *');
dump(
    
$cron->getNextRunDate()
        ->
format('Y-m-d H:i:s'),
    
$cron->getPreviousRunDate()
        ->
format('Y-m-d H:i:s')
);
Result
"2019-01-01 12:00:00"

"2018-12-09 12:00:00"