This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

The PHP Date() Function

Create a Date From a String With strtotime()

Tomorrow is 2024-09-22 12:00:00 am
Next Saturday is 2024-09-28 12:00:00 am
In three months it will be 2024-12-21 08:22:26 pm

<?php
$d=strtotime("tomorrow");
echo "<p>Tomorrow is " . date("Y-m-d h:i:s a", $d) . "<br>";

$d=strtotime("next Saturday");
echo "Next Saturday is " . date("Y-m-d h:i:s a", $d) . "<br>";

$d=strtotime("+3 Months");
echo "In three months it will be " . date("Y-m-d h:i:s a", $d) . "</p>";
?>