php: calculating past and future dates

March 8, 2012

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: 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 »