date-time

php: calculating past and future dates

March 8, 2012
By

I was doing all sorts of calculations about past and future dates, but stumbled on this simple equation: echo date(‘l jS F (Y-m-d)’, strtotime(‘-3 days’)); from this website: http://www.the-art-of-web.com/php/strtotime/ There are other nifty calculations, like finding the 3rd Saturday, etc: The strtotime function in PHP is incredibly powerful but very much underutilised – mainly...

Read more »