Unexpected Results When Adding Months To a Date

When adding or subtracting months to a date in PHP, you’ll get some uninuitive results in some cases. For example, strtotime( ‘+1 month’ ) will return the timestamp for July 1st when it’s executed on May 31st, instead of the expected June 30th. This is because a “month” is a fuzzy metric (i.e., some months […]

Continue reading...