PHP 3개월 , 6, 9 , 12 날짜 구하기

오늘 기준으로 3, 6, 9, 12 개월 된 날 구하기 


$kss['date'] = date('Y-m-d H:i:s'); // 오늘

$after_3m = date("Y-m-d H:i:s", strtotime($kss['date'].' + 3month - 1day'));
$after_6m = date("Y-m-d H:i:s", strtotime($kss['date'].' + 6month - 1day '));
$after_9m = date("Y-m-d H:i:s", strtotime($kss['date'].' + 9month - 1day '));
$after_12m = date("Y-m-d H:i:s", strtotime($kss['date'].' + 12month - 1day ')); 

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다