PHP code example of phellow / date
1. Go to this page and download the library: Download phellow/date 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/ */
phellow / date example snippets
$factory = new \Phellow\Date\DateFactory();
// create a DateTime object
$dt = $factory->createDateTime();
$dt = $factory->createDateTime('now');
$dt = $factory->createDateTime('2014-12-8');
$dt = $factory->createDateTime(time());
$dt = $factory->createDateTime($dt);
// create a Month object
$month = $factory->createMonth();
$month = $factory->createMonth('now');
$month = $factory->createMonth('2014-12-8');
$month = $factory->createMonth(time());
$month = $factory->createMonth($dt);