1. Go to this page and download the library: Download dasprid/local-date-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/ */
use DASPRiD\LocalDateTime\LocalDate;
$date = LocalDate::create(2019, 12, 31);
$newDate = $date->modify('-1 hour');
// $newDate will now be 2019-12-30, with the internal DateTime time reset to 00:00:00