getWeekFirstDay function

DateTimeWeekDay getWeekFirstDay([
  1. String? locale
])

Returns the first day of a week as enum DateTimeWeekDay for locale.

locale if null uses system default.

Implementation

DateTimeWeekDay getWeekFirstDay([String? locale]) {
  var dateSymbols = _getLocaleDateSymbols(locale);
  var firstdayofweek = dateSymbols.FIRSTDAYOFWEEK;
  var dateTimeWeekDay = getDateTimeWeekDay_from_ISO_8601_index(firstdayofweek)!;
  return dateTimeWeekDay;
}