dayOfWeek property

int get dayOfWeek

Gets the day of the week (1 = Monday, 7 = Sunday).

Example:

final christmas2023 = ZonedDateTime.parse('2023-12-25T00:00:00Z');
print(christmas2023.dayOfWeek); // 1 (Monday)

Implementation

int get dayOfWeek => _localDateTime.dayOfWeek;