date.dayOfWeek

Syntax date.dayOfWeek (date)

Params date is a valid date or a string that can be coerced to a date.

Action Returns a number indicating the day of the week.

Returns A number indicating the day of the week. Sunday is 1, Monday is 2, and so on.

Examples date.dayOfWeek ("4/7/2000")

   » 6 // April 7, 2000 was a Friday

date.dayOfWeek (clock.now ())

   » 1 // today is a Sunday

See Also date.dayOfWeekToString

date.day

date.get

Discuss