정확한 날짜 계산법 > 개발이야기

본문 바로가기
사이트 내 전체검색

정확한 날짜 계산법 > 개발이야기

[PHP] 정확한 날짜 계산법

페이지 정보

작성자 다미소프트 조회 12,536회 작성일 19-07-19 17:37 댓글 0건

본문

date("Y-m-d H:i:s", strtotime("-1 day")); // 어제
date("Y-m-d H:i:s", strtotime("now")); // 현재
date("Y-m-d H:i:s", strtotime("+1 day")); // 내일
date("Y-m-d H:i:s", strtotime("+1 week")); // 일주일 후
date("Y-m-d H:i:s", strtotime("-1 month")); // 한달 전
date("Y-m-d H:i:s", strtotime("+1 month")); // 다음달
date("Y-m-d H:i:s", strtotime("+1 week 2 days 3 hours 4 seconds")); // 1주 2일 3시간 4초 후
date("Y-m-d H:i:s", strtotime("next Thursday")); // 다음주 목요일
date("Y-m-d H:i:s", strtotime("last Monday")); // 지난 월요일
date("Y-m-d H:i:s", strtotime("10 September 2013")); // 2013년 9월 10일



출처: https://whiterussian.tistory.com/32 [화이트 러시안]

댓글목록

등록된 댓글이 없습니다.


Copyright © www.damisoft.co.kr. All rights reserved.