There is a requirement, where I have to Calculate First of prior quarter and Last of prior quarter with Today's date.
Jan, Feb, Mar -- 10/1-12/31 of prior year.
Apr, May, Jun -- 1/1-3/31 of current year.
Jul, Aug, Sep -- 4/1-6/30 of current year.
Oct, Nov, Dec -- 7/1-9/30 of current year.
This will give us current month:
Date todayDate = System.today().toStartOfMonth();
This will give us current quarter:
Integer currentQtr = Decimal.valueOf(todayDate.month()).divide(3.0, 0, System.RoundingMode.UP).intValue();