1. Go to this page and download the library: Download rxante/dateimmutable 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/ */
rxante / dateimmutable example snippets
$today = new \RxAnte\DateImmutable('now');
$specificDate = new \RxAnte\DateImmutable('2008-04-29');
$dateTime = new \DateTimeImmutable('2006-03-20 02:03:04');
$date = new \RxAnte\DateImmutable('2001-02-19');
$diff = $date->diff($dateTime);
// OR
$anotherDate = $date = new \RxAnte\DateImmutable('2001-02-12');
$diff2 = $date->diff($anotherDate);