1년동안 주차와 전년도 주차와 비교하기

1년동안 주차와 전년도 주차와 비교하기
고객이 검색한 년도의 1년동안의 매월 주를 계산을 하고 나서 기간에 따른 Row 갯수를 그래프에 표현을 하고 싶어 하기에 작성하게 된 것입니다. 조금은 난해하게 보이지만은 조건 검사가 많은 편이지 그다지 복잡한 코드는 아닙니다. $end_yearmonthday = date("Y-m-d", strtotime($_GET['end_year'].'-'.$_GET['end_month'].'-'.$_GET['end_day'])); // 이전년도 $agoTime = date('Y-m-d', strtotime(date('Y-01-01', strtotime($end_yearmonthday)).' -1 years')); $agoMaxWeek = date('W', strtotime(date('Y-12-31', strtotime($end_yearmonthday)).' -1 years')); $monthCnt = 0;…