PHP code example of effectra / clock

1. Go to this page and download the library: Download effectra/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/ */

    

effectra / clock example snippets


use Effectra\Clock\Clock;

$clock = new Clock();

$currentDateTime = $clock->now();
$currentTimestamp = $clock->timestamp();
$formatted = $clock->format('Y-m-d H:i:s');

use Effectra\Clock\Clock;

$clock = new Clock();

echo $clock->now()->format('Y-m-d H:i:s');
echo $clock->timestamp();
echo $clock->hijriFormat('d F Y');