DateTime.getDayOfWeek

Retrieves the ISO 8601 day of the week on which datetime falls (1 is Monday, 2 is Tuesday... 7 is Sunday).

class DateTime
int
getDayOfWeek
()

Return Value

Type: int

the day of the week

Meta

Since

2.26