Hacker News new | past | comments | ask | show | jobs | submit login
Good to bookmark: Test results of PHP's strtotime() function (pressbin.com)
5 points by jawns on March 29, 2011 | hide | past | favorite | 1 comment



Stick 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: