PHP code example of epiphany / date-factory
1. Go to this page and download the library: Download epiphany/date-factory 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/ */
epiphany / date-factory example snippets
$dateTimeFactory = new DateTimeFactory();
$now = $dateTimeFactory->now();
$then = $dateTimeFactory->now("yesterday"); // accepts any input to \DateTime::__construct()
var_dump([$now,$then]);