PHP code example of intriro / clock

1. Go to this page and download the library: Download intriro/clock library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

intriro / clock example snippets



class Event
{
    /**
     * @var DateTimeImmutable
     */
    private $date;

    public function hasPassed(Clock $clock): bool
    {
        if ($this->clock->now() > $this->date) {
            return true;
        }
        
        return false;
    }
}