DayOfWeek

Returns the current day of week.

Syntax

DayOfWeek(): number

Return Value

Returns a number representing the day of the week,where:

  • 0 represents Sunday

  • 1 represents Monday

  • 2 represents Tuesday

  • 3 represents Wednesday

  • 4 represents Thursdays

  • 5 represents Friday

  • 6 represents Saturday

Description

The DayOfWeek method returns the day of the week for the current time. The returned value is between 0 and 6, where 0 represents Sunday and 6 represents Saturday.

Example

Last updated