To get yesterday’s or tomorrow’s date in timestamp format (PHP), you need to use the standard PHP function "strtotime".
For example, let’s display the time of the current date at 00:00:00 (zero hours, zero minutes, zero seconds):
$t = strtotime('00:00:00');
echo 'Timestamp: '.$t;
echo 'Datetime: '.date('Y-m-d H:i:s',$t);Now the same, but for yesterday:
$t = strtotime('-1 day 00:00:00');
echo 'Timestamp: '.$t;
echo 'Datetime: '.date('Y-m-d H:i:s',$t);And the same for tomorrow:
$t = strtotime('+1 day 00:00:00');
echo 'Timestamp: '.$t;
echo 'Datetime: '.date('Y-m-d H:i:s',$t);Similarly, you can add weeks and other time periods as needed.
