PHP 날짜 계산 관련 함수
날짜 관련해서 여러 참고 자료들이 많치만
제가 많이 쓰는 것들만 올려봅니다.
$time = time();
echo date("Y-m-d",strtotime("-1 day", $time))." 하루 전(어제)";
echo date("Y-m-d",strtotime("-1 day", $time))." 하루 전(어제)";
echo date("Y-m-d",strtotime("now", $time))." 현재";
echo date("Y-m-d",strtotime("+1 day", $time))." 하루 후(내일)";
echo date("Y-m-d",strtotime("+1 week", $time))." 일주일 후";
echo date("Y-m-d",strtotime("-1 month", $time))." 한달 전";
echo date("Y-m-d",strtotime("+1 month", $time))." 다음달";
echo date("Y-m-d",strtotime("+6 month", $time))." 6달후";
echo date("Y-m-d",strtotime("+12 month", $time))." 12달후";
echo date("Y-m-d",strtotime("next Thursday", $time))." 다음주 목요일";
echo date("Y-m-d",strtotime("last Monday", $time))." 지난 월요일";
echo date("Y-m-d",strtotime("10 September 2000", $time))." 2000년 9월 10일";
echo strtotime("+5 minutes"); " 현재 시간보다 5분 후";
게시판 목록
토크
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3421 |
프로프리랜서
|
13년 전 | 2102 | |
| 3420 |
SeanLee
|
13년 전 | 1930 | |
| 3419 | 13년 전 | 1957 | ||
| 3418 | 13년 전 | 2059 | ||
| 3417 | 13년 전 | 2477 | ||
| 3416 | 13년 전 | 4313 | ||
| 3415 | 13년 전 | 3683 | ||
| 3414 | 13년 전 | 3460 | ||
| 3413 |
crocojea
|
13년 전 | 2410 | |
| 3412 | 13년 전 | 2278 | ||
| 3411 | 13년 전 | 1676 | ||
| 3410 | 13년 전 | 1694 | ||
| 3409 |
|
13년 전 | 1953 | |
| 3408 | 13년 전 | 1229 | ||
| 3407 | 13년 전 | 1594 | ||
| 3406 | 13년 전 | 1385 | ||
| 3405 | 13년 전 | 2093 | ||
| 3404 | 13년 전 | 1593 | ||
| 3403 | 13년 전 | 1629 | ||
| 3402 | 13년 전 | 2199 | ||
| 3401 | 13년 전 | 1499 | ||
| 3400 |
|
13년 전 | 2184 | |
| 3399 |
임페리얼웹
|
13년 전 | 2245 | |
| 3398 |
임페리얼웹
|
13년 전 | 2578 | |
| 3397 |
원시인교주
|
13년 전 | 1394 | |
| 3396 | 13년 전 | 1608 | ||
| 3395 | 13년 전 | 1467 | ||
| 3394 | 13년 전 | 1376 | ||
| 3393 | 13년 전 | 1393 | ||
| 3392 | 13년 전 | 1403 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기