php获取本季开始结束时间

2024年09月05日 | 分类: php | 评论: 0 | 浏览: 17
                $jijie = [
                    strtotime(date('Y-01-01')),
                    strtotime(date('Y-04-01')),
                    strtotime(date('Y-07-01')),
                    strtotime(date('Y-10-01')),
                ];
    
                for($i=0;$i<4;$i++){
                    if(time() > $jijie[$i]){
                        $start = date('Y-m-d H:i:s',$jijie[$i]);
                        $end = date('Y-m-d H:i:s',strtotime($start.' +3 month') -1);
                    }
                }


顶一下 ▲()
踩一下 ▼()
发表留言
登录后才能发表留言,立即 登录注册
提交 (Ctrl+Enter)
Copyright 2020-2024 xaoi博客 All Rights Reserved.