# 昨天所在月份的第一天
date("Y-m-01", strtotime("-1 day"));
# 昨天
date("Y-m-d", strtotime("-1 day"));
# 指定日期的当月第一天
date("Y-m-01", strtotime($date));
# 指定日期的当月最后一天
date('Y-m-t', strtotime($date));
# 指定日期下个月的第一天
date('Y-m-01', strtotime("$date +1 month"));
# 指定日期下个月的最后一天
date('Y-m-t', strtotime("$date +1 month"));