草庐IT

nextPaymentDate

全部标签

PHP 从 12 月 29 日起生成错误的下一个付款日期

我在PHP中使用以下逻辑根据我的订阅按比例生成下一个付款日期://calculatingnextpaymentdate$today=date('d');$checkDate='15';if($today>=$checkDate){//subscriptionpurchaseafter15.$nextPaymentDate=date('Y-m-01',strtotime('+2month'));}else{//subscriptionpurchasebefore15.$nextPaymentDate=date('Y-m-01',strtotime('nextmonth'));}基本上,当