dow()

Gets the day of the week for the specified date. This is different from Date.prototype.getDay() because it allows for the first day of the week to be days other than Sunday.

This function is valid in v2.20.0 to v2.23.0. This function has been downloaded 7 times.

Parameters

{Date} date
Date object from which to pull the day of the week.
{number=} opt_firstDayOfWeek Optional
Indicates what the first day of the week is. If given it should be between 0 (for Sunday) and 6 (for Saturday).

Returns

{number}
A number between 0 and 6. 0 will always correspond to the value of opt_firstDayOfWeek whereas 1 will be the next day and so on.