public string ToString(string format, IFormatProvider formatProvider) { DateTimeFormatInfo dateTimeFormatInfo = LocalizedDayOfWeek.GetDateTimeFormatInfo(formatProvider); int num = (int)dateTimeFormatInfo.FirstDayOfWeek; DaysOfWeek daysOfWeek = (DaysOfWeek)(1 << num | 1 << (num + 6) % 7); DaysOfWeek daysOfWeek2 = DaysOfWeek.AllDays & ~daysOfWeek; if (this.daysOfWeek == daysOfWeek2) { if (format == "s") { return(ClientStrings.WhenEveryWeekDay.ToString(formatProvider)); } if (format == "p") { return(ClientStrings.WhenOnWeekDays.ToString(formatProvider)); } return(ClientStrings.WhenWeekDays.ToString(formatProvider)); } else { if (this.daysOfWeek == daysOfWeek) { return(ClientStrings.WhenBothWeekendDays.ToString(formatProvider)); } if (this.daysOfWeek != DaysOfWeek.AllDays) { return(LocalizedDaysOfWeek.EnumerateDaysOfWeek(this.daysOfWeek).ToString(formatProvider)); } if (format == "s") { return(ClientStrings.WhenEveryDay.ToString(formatProvider)); } if (format == "p") { return(ClientStrings.WhenOnEveryDayOfTheWeek.ToString(formatProvider)); } return(ClientStrings.WhenAllDays.ToString(formatProvider)); } }
public string ToString(string format, IFormatProvider formatProvider) { return(LocalizedDayOfWeek.GetDateTimeFormatInfo(formatProvider).MonthNames[this.month - 1]); }
public string ToString(string format, IFormatProvider formatProvider) { return(LocalizedDayOfWeek.GetDateTimeFormatInfo(formatProvider).DayNames[(int)this.dayOfWeek]); }