Returns the day of the week value in a Date object using Universal Coordinated Time (UTC).
The required dateObj reference is a Date object.
To get the day of the week using local time, use the getDate method.
The value returned by the getUTCDay method is an integer between 0 and 6 representing the day of the week and corresponds to a day of the week as follows:
Day of the Week
The following example illustrates the use of the getUTCDay method.