Beispiel #1
0
        public static Tuple <string, string> GetDayOfTheWeak(string text)
        {
            var date = DateTime.Today.Date;

            switch (text)
            {
            case ("завтра"):
                date = date.AddDays(1);
                break;

            case ("сегодня"):
                break;

            case ("вчера"):
                date = date.AddDays(6);
                break;

            default:
                return(null);
            }
            var day  = ConvertToRus(date.DayOfWeek.ToString());
            var weak = Weak.GetWeak();

            if (day.Equals("суббота") || day.Equals("воскресенье"))
            {
                day = "Выходной";
            }
            if (day.Equals("понедельник") && text.Equals("завтра"))
            {
                weak = Weak.GetNextWeak();
            }

            return(Tuple.Create(day, weak));
        }
Beispiel #2
0
 public Subject()
 {
     OddWeak  = new Weak("Нечётная", true);
     EvenWeak = new Weak("Четная", true);
 }