weekday method

int weekday()

Returns day of week: Sunday is 1, Saturday is 7

Implementation

int weekday() => DateTime(year, month, day).weekday;