I am trying to set a start date and end date by the quarter.
For example, I am working on a reporting system where i need to report data for quarter 1, quarter 2, qu
A simpler way to get the start/end of the current quarter in dates:
$qtr_start = date("Y-".(ceil(date("n")/3))."-01");
Then, just add 3 months in the correct place to get the end:
$qtr_end = date("Y-".(ceil(date("n")/3)+3)."-01");
Just my two cents.