PHP code example of joshtronic / randomdate
1. Go to this page and download the library: Download joshtronic/randomdate 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/ */
joshtronic / randomdate example snippets
$rd = new joshtronic\RandomDate();
// Between the Unix Epoch and now
$rd->date(/* format string, default = 'c' */);
// Between January 1st, 1900 and now
$rd->min('1900-01-01')->date('Y-m-d');
// Between the Unix Epoch and next month
$rd->max('next month')->date('r');
// Between yesterday and tomorrow (at midnight)
$rd->between('yesterday', 'midnight tomorrow')->date('r');
// Reset minimum and maximum to defaults
$rd->reset->date();