UPDATED 12/2: Code updated for efficiency and code download link added.
Ran into a problem today– there’s no easy way to add and subtract dates in PHP and be left with standard units (year, month, day, etc), so I whipped up a quick script to do it– the biggest problem is months, here, since PHP deals with second-based timestamps, and months don’t possess a standard number of seconds. Without further ado, here’s the code– I hope it’s helpful to your projects:
(more…)
and
