PHP code example of kumatch / dateclock

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

    

kumatch / dateclock example snippets


use Kumatch\DateClock\DateClock;

$clock = new DateClock();
$dateTime = $clock->now();  // Returns current DateTime object.

$clock->stop("2001-01-01 00:00:00"); // or set DateTime object
$dateTime = $clock->now();  // Returns "2001-01-01 00:00:00" DateTime object any time.

$clock->reset();
$dateTime = $clock->now();  // Returns current DateTime object.