DateTime.getDayOfWeek

int getDayOfWeek()

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

Returns

the day of the week