persianWeeklyName static method

dynamic persianWeeklyName(
  1. DateTime dateTime
)

Implementation

static persianWeeklyName(DateTime dateTime) {
  DateTime gregorianDate = jalaliToGregorian(dateTime.year, dateTime.month, dateTime.day);
  switch (gregorianDate.weekday) {
    case 1:
      return "دوشنبه";
    case 2:
      return "سه شنبه";
    case 3:
      return "چهارشنبه";
    case 4:
      return "پنجشنبه";
    case 5:
      return "جمعه";
    case 6:
      return "شنبه";
    case 7:
      return "یکشنبه";
    default:
      return "";
  }
}