PHP strtotime()

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 참고[ | ]