I'm trying to figure out the best way to handle this situation. I have a website that has a ton of static set dates on it. Every year the dates will need to be adjusted for the upcoming year (ie. Feb 18th 2010 will be Feb 17th 2011). I was thinking of creating a function or maybe just an echo statement saying the third thursday of february 2011. With 2011 being a variable that can be changed in one place.
I don't think this code actually works since I'm not sure how to get the variable $year instead of using the system year.
Any help is appreciated.
Code:
$year = "2011";
date('l, M. jS', strtotime('third thursday $year'));
I don't think this code actually works since I'm not sure how to get the variable $year instead of using the system year.
Any help is appreciated.