【发布时间】:2013-02-25 05:32:55
【问题描述】:
我正在尝试在 php.ini 中创建日历。我需要得到该月第一天的工作日(周日、周一等)。到目前为止我的代码是:
<?php
$current_month = date("n");
$current_year = date("Y");
$first_day_of_month = new DateTime();
$first_day_of_month -> setDate($current_year,$current_month,1);
?>
我不知道如何获取设定日期的工作日(每月的第一天)。有什么建议吗?
【问题讨论】: