$begin_day = 날짜("Y-m-d 00:00:00"); $end_day = 날짜("Y-m-d 23:59:59"); $last_begin = 날짜("Y-m-d 00:00:00",strtotime("마지막 날")); $last_end = 날짜("Y-m-d 23:59:59",strtotime("마지막 날")); $next_begin = 날짜("Y-m-d 00:00:00",strtotime("다음 날")); $next_end = 날짜("Y-m-d 23:59:59",strtotime("다음 날")); $month_times = strtotime(날짜("Y-m")); $monthday = 날짜("t"); $월 = 날짜("n"); $begin_this_week=날짜("Y-m-d 00:00:00",strtotime("지난 일요일 +1일")); $end_this_week=날짜("Y-m-d 23:59:59",strtotime("다음 일요일")); $begin_this_month=날짜('Y-m-01 00:00:00'); $end_this_month=날짜("Y-m-$monthday 23:59:59",strtotime("이번 달",$month_times)); if($month==1 || $month ==2 ||$월==3){ $begin_this_quarter=날짜('Y-01-01 00:00:00' ); $end_this_quarter=날짜("Y-03-31 23:59:59" ); }elseif($month==4 || $month==5 ||$월==6){ $begin_this_quarter=날짜('Y-04-01 00:00:00' ); $end_this_quarter=날짜("Y-06-30 23:59:59" ); }elseif($월==7 || $월==8 ||$월==9){ $begin_this_quarter=날짜('Y-07-01 00:00:00' ); $end_this_quarter=날짜("Y-09-30 23:59:59" ); }그밖에{ $begin_this_quarter=날짜('Y-10-01 00:00:00' ); $end_this_quarter=날짜("Y-12-31 23:59:59" ); } $begin_this_year=날짜('Y-01-01 00:00:00' ); $end_this_year=날짜('Y-12-31 23:59:59' ); //一季道是1月1日到3月31日; 2季道是4月1日到6月30;3季島是7月1到9月30;4季道是10월 1到12월 31일 에코 "当天 a> | "; 에코 "前天 a> | "; 에코 "명천 a> | "; 에코 "本周< /a> | "; 에코 "本月< /a> | "; 에코 "本季島< /a> | "; 에코 "本年< /a> "; 以上就介绍了php 获取日期(当天,前天,明天,本周,本月,本季島,本年),包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。