22 ms·
Good to bookmark: Test results of PHP's strtotime() function
- smokestack 16y agoStick with php -a, or here's a bash script that does the same thing: #!/usr/bin/php <?php $input = implode(' ', array_slice($argv, 1)); $timestamp = strtotime($input); echo "Raw: $input\n"; echo "Interpreted: " . date('r', $timestamp) . " ($timestamp)\n"; Usage: ./test_strtotime Mar 5 ./test_strtotime "Mar 5" 2009