This function is used in recent projects to calculate the date after N working days. Now we can solve the problem by thinking of the following solutions.
This indicates that the work days are calculated according to national regulations, that is, from Monday to Friday and before and after the statutory holidays, the work days are counted as work days, and Saturday, Sunday, and statutory holidays are not counted as work days, the statutory day and the date of the shift can be stored in the database for maintenance.
The Code is as follows, and the efficiency is not very high. If you have a better solution, please share it with others.
<? "Asia/Shanghai"); = (0, 0,); = 10; = (0, 0,), (0, 0, 11,2013); = (0, 0,), (0, 0,); = ("d",); = 0; (<) {= (0, 0, 0, ("m",), ++, ("Y ",));((,)) {++ {("w ",)! = 0 & ("w ",)! = 6 &&! (, ++ ("Y-m-d",) ;?>