3월 31일 , 4월 30일 등...
각 월의 말일을 표시할 때는 어케해야하나요?
$last_month_31=date("Y-m-31",strtotime('last month'));
이렇게 하다보니..에궁.. 2012-04-31 되네요..
각 월의 말일을 표시할 때는 어케해야하나요?
$last_month_31=date("Y-m-31",strtotime('last month'));
이렇게 하다보니..에궁.. 2012-04-31 되네요..
댓글 3개
검색해서 찾았습니다.
이번달의 마지막 날을 출력합니다.
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′))));
이번달의 마지막 날을 출력합니다.
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′))));
게시글 목록
| 번호 | 제목 |
|---|---|
| 284438 | |
| 284437 | |
| 284435 | |
| 284430 | |
| 284420 | |
| 284417 | |
| 284409 | |
| 284401 | |
| 284399 | |
| 284397 | |
| 284380 | |
| 284378 | |
| 284371 | |
| 284370 | |
| 284366 | |
| 284364 | |
| 284360 | |
| 284357 | |
| 284355 | |
| 284354 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기