PHP code example of php-value-object / date-time-range

1. Go to this page and download the library: Download php-value-object/date-time-range 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/ */

    

php-value-object / date-time-range example snippets

 php
$dateTimeRange = new DateTimeRange(
    new \DateTimeImmutable('2015-01-01'),
    new \DateTimeImmutable('2015-03-25')
);