PHP code example of alexeyshockov / clock

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

    

alexeyshockov / clock example snippets

 php


$period = new \DatePeriod('R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M');

// Converting period to collection of dates with Colada.
$dates = to_collection($period);

$formattedDates = $dates->mapBy(x()->format(\DateTime::ATOM));