티스토리 뷰

 

일요일   ~ 월요일  한주간 날짜 얻어오기

 

$today = strtotime('today');

$onDay = 86400; // 하루 
$current_week =  strtotime('this week') - $onDay;  //일요일 부터 시작 하려고 하루를 뺌
$current_week_end = $current_week  + ( $onDay * 6 );

$next_week =  strtotime('next week') - $onDay;
$next_week_end = $next_week  + ( $onDay * 6 );

echo date('m.d', $today );

echo date( 'm.d', $current_week);

echo date( 'm.d', $current_week_end );

echo date( 'm.d', $next_week) ;

echo date( 'm.d', $next_week_end );

댓글
댓글쓰기 폼