1. Go to this page and download the library: Download twipsi/chronos 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/ */
twipsi / chronos example snippets
Chronos::date(new Chronos)...
Chronos::date(new DateTime)...
Chronos::date('2022-05-05 10:10:10')...
Chronos::date(1664524279)...
new Chronos(new DateTime)
Chronos::date()->travel('2022-05-05 10:10:10')
->daysPassed() // This will return 0 if travel date is in the future.
->differenceInDays() // This will return negative days if travel is in the past.
->hoursPassed()
->differenceInHours()
->minutesPassed()
->differenceInMinutes()
->secondsPassed()
->differenceInSeconds()