How do Get Tomorrow’s Date using PHP?
Working with dates in PHP is very common, especially when dealing with scheduling, bookings, reminders, or future events. In this tutorial, we will learn how to get tomorrow’s date using simple built-in PHP functions. You will see clear examples for both the current date and a given date.
PHP provides powerful date functions, and getting tomorrow’s date is easier than most developers expect. Let’s jump into practical code examples.
Get Tomorrow’s Date From the Current Date
If you want to get tomorrow’s date based on the system’s current date, you can use PHP’s strtotime() function combined with date().
<?php
$new_date = date('Y-m-d', strtotime('+1 day'));
echo $new_date;
?>
Output Example
2021-11-29
Here:
strtotime('+1 day')moves the timestamp forward by one daydate('Y-m-d', ...)formats the result toYYYY-MM-DD
Get Tomorrow’s Date Using the “tomorrow” Keyword
PHP also supports human-readable keywords inside strtotime(). Instead of manually adding one day, you can simply write:
<?php
$new_date = date('Y-m-d', strtotime('tomorrow'));
echo $new_date;
?>
Output Example
2021-11-29
Both approaches produce the same result. Use whichever is easier for your project.
Final Thoughts
Using date() with strtotime() is the simplest way to calculate tomorrow’s date in PHP. You can apply the same logic to calculate yesterday, next month, or any other period simply by changing the argument passed to strtotime().