1. Go to this page and download the library: Download icecave/chrono 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/ */
icecave / chrono example snippets
use Icecave\Chrono\Clock\SystemClock;
// Construct a new system clock ...
$clock = new SystemClock;
// Obtain a DateTime instance representing the current date and time ...
$now = $clock->localDateTime();
// Obtain a Date instance representing the current date ...
$today = $clock->localDate();
// Obtain the current time of day ...
$timeOfDay = $clock->localTime();
use DateTime as NativeDateTime;
use Icecave\Chrono\DateTime;
$dateTime = DateTime::fromNativeDateTime(new NativeDateTime);
$nativeDateTime = $dateTime->nativeDateTime();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.