PHP code example of sfneal / time-helpers
1. Go to this page and download the library: Download sfneal/time-helpers 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/ */
sfneal / time-helpers example snippets
php
use Sfneal\Helpers\Time\TimePeriod;
// Retrieve a TimePeriod representing today (02/16/2021)
[$start, $end] = TimePeriods::today();
// $start >>> 2021-02-16 00:00:00
// $end >>> 2021-02-16 23:59:59