Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以解释为什么
echo date("Y-m-d",strtotime("Wednesday, 1 January, 2014"));
返回
2013-01-02
一月后去掉逗号:
date_default_timezone_set('America/New_York'); echo date("Y-m-d",strtotime("Wednesday, 1 January 2014"));
strtotime()虽然灵活,但仍有严格的格式标准。
strtotime()
给出正确的格式
strtotime("Wednesday, January 1, 2014")