day static method

string day(
  1. int day, [
  2. dynamic locale
])

Returns the name of the day corresponding to the given day index.

The day index should be a value between 1 and 7, inclusive. If locale is provided, the name of the day will be returned in the specified locale. If locale is not provided, the default locale will be used.

Example:

String dayName = day(3);
print(dayName); // Output: "Wednesday"

Implementation

static string day(int day, [dynamic locale]) => days(locale)[day.clampRotate(1, 7) - 1];