I'm looking for a tutorial on doing date math in PHP.
Specifically, I need to be able to add or subtract days and be sure the month and year get changed where appropriate.
Example:
2006-04-05 MINUS 7 days = 2006-03-31
2006-12-26 PLUS 7 days = 2007-01-01
etc.
I'm having difficulty coiming up with a simple way to do it without screwing up my table data which is stored as YYYY-MM-DD.