PHP strtotime()

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

1 개요[ | ]

PHP strtotime()
PHP
CPU
0.0s
MEM
21M
0.1s
Copy
<?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";
1633814161
968544000
1633900561
1634418961
1634606163
1634169600
1633305600
PHP
Copy
<?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";
Loading

2 같이 보기[ | ]

3 참고[ | ]