in reply to previous and next quarter calculation
Assuming quarters start on first day on Jan, Apr, Jul and Oct, get the components of the date, and ajust them as follows to get the start of the current quarter:
# Assumes Jan is month 0, Feb is month 1, etc $month = int($month / 3) * 3; $day = 1;
Add/substract three months to the start of the current quarter for the start of the next/previous quarter.
|
|---|