How can I get the current quarter we are in with javascript? I am trying to detect what quarter we are currently in, e.g. 2.
EDIT And how can I coun
if the first solution doesn't work than you can just adjust it to the range you would like
var today = new Date(); var month = now.getMonth(); var quarter; if (month < 4) quarter = 1; else if (month < 7) quarter = 2; else if (month < 10) quarter = 3; else if (month < 13) quarter = 4;