$now = new DateTime();
\$Now = " . $now->format('m/d/Y h:m') . "\n");
?>
$expires = new DateTime('2018-03-15 13:30:00');
$tomorrow = new DateTime('+1 day');
$due_date = new DateTime('+3 weeks');
$appointment = new DateTime('next Friday +1 week 13:30');
echo("<p>Appoingtment: $appointment.</p>\n");
\$1ppointment = " . $appointment->format('m/d/Y h:m') . "\n");
?>
$invoice_date = new DateTime('2017-09-15 13:30:00');
echo("<p>\$invoice_date = " . $invoice_date->format('m/d/Y h:m') . "</p>\n");
$due_date = clone $invoice_date;
echo("<p>\$due_date = " . $due_date->format('m/d/Y h:m') . "</p>>\n");
\$invoice_date = " . $invoice_date->format('m/d/Y h:m') . "\n");
$due_date = clone $invoice_date;
echo("\$due_date = " . $due_date->format('m/d/Y h:m') . "
\n"); ?>
$due_date->setTime(22, 30, 0); // 10:30 pm
$due_date->setDate(2017, 9, 15); // 9/15/2017
setTime(22, 30, 0); // 10:30 pm
$due_date->setDate(2017, 9, 15); // 9/15/2017
?>
$due_date->modify('+3 weeks');
echo("<p>$due_date = " . $due_date->format('m/d/Y h:m') . "</p>\n");
modify('+3 weeks');
echo("\$due_date = " . $due_date->format('m/d/Y h:m') . "
\n"); ?>
echo("<p>Payment Due: " . $due_date->format('M. j, Y \a\t g:i a') . "</p>\n");
Payment Due: " . $due_date->format('M. j, Y \a\t g:i a') . "\n");
?>
$tomorrow = strtotime('tomorrow 8am');
$nextday = new DateTime();
$nextday->setTimestamp($tomorrow);
echo("<p>\$nextday = " . $nextday->format('m/d/Y h:m a') . "</p>\n");
setTimestamp($tomorrow);
echo("\$nextday = " . $nextday->format('m/d/Y h:m a') . "
\n"); ?>strtotime()
function.