The content of this article is about how to get the specific date of the working day after the specified date in ThinkPHP (detailed code explanation). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. help.
Idea:
1. Obtain the data array of all working days in the query year
2. Obtain the index of the query start date on the working days
3. Calculate the date to be queried Index
4, get query date
/*创建日期类型记录表格*/ CREATE TABLE `tb_workday` ( `did` int(11) NOT NULL AUTO_INCREMENT, `exact_date` varchar(32) NOT NULL COMMENT '具体日期:格式date("Ymd");(20170205)', `date_year` varchar(32) NOT NULL COMMENT '具体日期:格式date("Y");(2017)', `date_type` tinyint(2) NOT NULL COMMENT '日期类型:0、工作日;1、特殊工作日;2、法定节假日', PRIMARY KEY (`did`) ) ENGINE=InnoDB AUTO_INCREMENT=829 DEFAULT CHARSET=utf8 COMMENT='各年工作日&法定节假日数据'
The above is the detailed content of How to get the specific date of the working day after the specified date in ThinkPHP (detailed code explanation). For more information, please follow other related articles on the PHP Chinese website!