By default, the function returns the day of the quarter for the current date (according to local time). To determine the day of the quarter for a particular day, provide month, day, and year arguments.
A month may be either a month's integer value, three letter abbreviation, or full name (case insensitive).
The function also accepts a Date object.
throws
must provide a recognized month
throws
an integer month argument must be on the interval [1,12]
throws
second argument must be greater than 0 and less than or equal to the maximum number of days in a month
Parameters
Optional month: string | number | Date
month (or Date)
Optional day: undefined | number
day
Optional year: undefined | number
year
Returns
number
day of the quarter
Example
var day = dayOfQuarter();
// returns <number>
day = dayOfQuarter( newDate() );
// returns <number>
day = dayOfQuarter( 12, 31, 2017 );
// returns 92
Returns the day of the quarter.
Notes
month
,day
, andyear
arguments.month
may be either a month's integer value, three letter abbreviation, or full name (case insensitive).Date
object.must provide a recognized month
an integer month argument must be on the interval
[1,12]
second argument must be greater than
0
and less than or equal to the maximum number of days in a month