Skip to content

Instantly share code, notes, and snippets.

@ilyabrin
Created April 25, 2013 08:07
Show Gist options
  • Select an option

  • Save ilyabrin/5458240 to your computer and use it in GitHub Desktop.

Select an option

Save ilyabrin/5458240 to your computer and use it in GitHub Desktop.
PHP :: Get Previous Day
<?php
$date_start = date('Y-m-d 00:00:00', strtotime('-1 day')) ;
$date_finish = date('Y-m-d 23:59:59', strtotime('-1 day')) ;
echo "<b>Date start:</b> " . $date_start ."<br/>";
echo "<b>Date finish:</b> " . $date_finish ."<br/>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment