Simply add a parameter called "+1 day" when instantiating the DataTime class.
<?php // today $today = new DateTime(); echo $today->format('Y-m-d') . PHP_EOL; // tomorrow $tomorrow = new DateTime('+1 day'); // or $tomorrow = new DateTime('tomorrow'); echo $tomorrow->format('Y-m-d');
Top comments (1)
can use just : new DateTime('tomorrow');