获取某日期后一周、一月、一年的日期 php

//获取某日期后三周同一天日期
public static function getNextDate($date){
$return = [
date( 'Y-m-d', strtotime("$date +1 day") ),
date( 'Y-m-d', strtotime("$date +1 week") ),
date( 'Y-m-d', strtotime("$date +1 month") ),
date( 'Y-m-d', strtotime("$date +1 year") ),
];

return $return;
}

//日期之前用- $date = '2020-10-11';
posted @ 2020-10-11 15:57  北往星辰  阅读(665)  评论(0编辑  收藏  举报