The quarter (zero based) the date is in.
Extension to the native date variable to get the quarter a given date is in.
The Date.getQuarter method can be used to get the quarter the date is in. The quarter will be return as a zero based value - therefore if a date is in the first quarter, a value of "0" will be returned.
var d = new Date(2018,7,10); var q = d.getQuarter(); // q = 2