[PHP] 정확한 날짜 계산법
페이지 정보
작성자 다미소프트 조회 12,539회 작성일 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 [화이트 러시안]
- 현재글 정확한 날짜 계산법
- 다음글GET 혹은 POST로 넘어온 값 확인하기 19.03.25
댓글목록
등록된 댓글이 없습니다.