PHP code example of navarr / specific-time
1. Go to this page and download the library: Download navarr/specific-time 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/ */
navarr / specific-time example snippets
use DateTimeImmutable;
use Navarr\SpecificTime\SpecificTime;
// ...
$date = new DateTimeImmutable('2021-02-20');
$clock = new SpecificTime($date);
// 2021-02-20
echo $clock->now()->format('Y-m-d');