month (or Date)
day
year
day of the year
var day = dayOfYear();
// returns <number>
var day = dayOfYear( new Date() );
// returns <number>
var day = dayOfYear( 12, 31, 2017 );
// returns 365
var day = dayOfYear( 12, 31, 2016 );
// returns 366
Returns the day of the year.
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