• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3696
  • Last Modified:

calculate current yearly quarter

Im looking for a script I can re-use for one of my own projects, I need to calculate the current quarter in relation to the current month and day, the yearly quarters are standard ones in the range:-


Jan-Mar
Apr-June
July-Sep
Oct-Dec


So for example, today it's Wednesday 22nd March, the current quarter is the first quarter, Im not asking for someone to wrte this for me just trying looking for some links to already created scripts, all my searches turned up with nothing.




Cheers

James
0
JB04
Asked:
JB04
1 Solution
 
RoonaanCommented:
You can just request the month using:

$month = intval(date('m'));

Then calculate the quarter from that.

-r-
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now