1. Go to this page and download the library: Download natedrake/datehelper 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/ */
natedrake / datehelper example snippets
use Natedrake\DateHelper\Date;
use Natedrake\DateHelper\DateFormat;
$datePosted=date('2015-08-02 10:36:15');
$date=Date::get()->getDifferenceFromNow($datePosted);
DateFormat::EASY *25th of March 2016 09:00:00 AM*
DateFormat::BIG *2016-03-25 09:00:00*
DateFormat::LITTLE *25-03-2016 09:00:00*
DateFormat::MIDDLE *03-25-2016 09:00:00*
DateFormat::ISO8601 *2016-03-25T09:00:00+01:00*
DateFormat::RFC2822 *Fri, 25 Mar 2016 09:00:00 +0100*
DateFormat::EPOCH *1458892800*
DateFormat::DAY *Friday*
DateFormat::MNT *Mar*
DateFormat::YEAR *2016*
DateFormat::GMT *+01:00* // Time zone difference from GMT
DateFormat::LEAP *1* // Returns 1 if year is a leap year
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.