I need to store a list of holidays in a MySQL database table, and be able to generate and output the exact date these holidays will fall on in any given year using PHP.
For some this is easy (they fall on a given date every year), but for many others the holiday falls on the [first/second/third etc] [day of week] in [month]. What would be the most efficient way to store these date rules in a MySQL table, then calculate and output the exact date the holiday will fall on for any given year, using MySQL and PHP?
Take a look at
strtotime():Output: