월별 말일 표시는 어떻게 하나요? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

월별 말일 표시는 어떻게 하나요? 정보

월별 말일 표시는 어떻게 하나요?

본문

3월 31일 , 4월 30일 등...
각 월의 말일을 표시할 때는 어케해야하나요?

$last_month_31=date("Y-m-31",strtotime('last month'));

이렇게 하다보니..에궁.. 2012-04-31 되네요..

댓글 전체

검색해서 찾았습니다.
이번달의 마지막 날을 출력합니다.

date(’Y-m-d’,strtotime(’-1 second’,strtotime(’+1 month’,strtotime(date(’m').’/01/’.date(’Y').’ 00:00:00′))));

지난달
date(’Y-m-d’,strtotime(’-1 second’,strtotime(date(’m').’/01/’.date(’Y').’ 00:00:00′)));
지지난달
date(’Y-m-d’,strtotime(’-1 second’,strtotime(’-1 month’,strtotime(date(’m').’/01/’.date(’Y').’ 00:00:00′))));

다음달
date(’Y-m-d’,strtotime(’-1 second’,strtotime(’+2 month’,strtotime(date(’m').’/01/’.date(’Y').’ 00:00:00′))));
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT