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.
我需要一个 PHP 项目的东西,使我能够返回奇数日期,例如“本月的每隔一个星期六”或“本月的每个第四个星期五”。任何帮助将不胜感激!
这是一个旧帖子,但供参考:
https://github.com/tplaner/当
尝试这个
<?php $date = date('Y-m-d', mktime(0, 0, 0, date('m'), 1, date('y'))); echo date('Y-m-d', strtotime($date.'fourth friday')); ?>
这将为您提供当月第四个星期五的日期