Issue with php strtotime function when using ordinal values
问题 I sometime get unexpected results when using ordinal values with strtotime. For example, why does date("M j", strtotime("second Tuesday February 2011")) result in "Feb 15" (which is actually the third Tuesday in 2011? 回答1: You are missing an 'of'. $ php -r 'echo date("M j", strtotime("second Tuesday February 2011"));' Feb 15 $ php -r 'echo date("M j", strtotime("second Tuesday of February 2011"));' Feb 8 PHP Version: $ php -v PHP 5.3.3 (cli) (built: Aug 22 2010 19:41:55) Copyright (c) 1997