PHP - Getting Yesterday\'s Date in PHP


/ Published in: PHP
Save to your folder(s)

Example calculate yesterday, but if you multiply by some number you can get in an easy way, weeks, months or years


Copy this code and paste it in your HTML
  1. date("Y-m-d", time() - (60*60*24) ); // get Yesterday date

URL: http://terriswallow.com/weblog/2009/get-calculate-yesterday-date-php/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.