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
^ "2021-06-01 12:00:00"

^ "2021-05-09 12:00:00"
Used Versions
PHP 8.0, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8