By default, the function returns the quarter of the year for the current month in the current year (according to local time). To determine the quarter for a particular month, provide either a month or a Date object.
A month may be either a month's integer value, three letter abbreviation, or full name (case insensitive).
throws
must provide a recognized month
throws
an integer month argument must be on the interval [1,12]
Parameters
Optional month: string | number | Date
month (or Date)
Returns
number
quarter of the year
Example
var q = quarterOfYear( newDate() );
// returns <number>
Returns the quarter of the year.
Notes
Date
object.month
may be either a month's integer value, three letter abbreviation, or full name (case insensitive).must provide a recognized month
an integer month argument must be on the interval
[1,12]