PHP strtotime()

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:58 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

PHP strtotime()
<?php
echo strtotime("now"), "\n";
echo strtotime("10 September 2000"), "\n";
echo strtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime("next Thursday"), "\n";
echo strtotime("last Monday"), "\n";
<?php
echo date('Y-m-d H:i:s', strtotime("now")), "\n";
echo date('Y-m-d H:i:s', strtotime("10 September 2000")), "\n";
echo date('Y-m-d H:i:s', strtotime("+1 day")), "\n";
echo date('Y-m-d H:i:s', strtotime("+1 week")), "\n";
echo date('Y-m-d H:i:s', strtotime("+1 week 2 days 4 hours 2 seconds")), "\n";
echo date('Y-m-d H:i:s', strtotime("next Thursday")), "\n";
echo date('Y-m-d H:i:s', strtotime("last Monday")), "\n";

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}