コード例 #1
0
ファイル: Schedule.cs プロジェクト: grayingram/Scheduler
        private List <DateTime> GetDates(string word, int givenyear, int givenmonth)
        {
            List <DateTime> dates     = new List <DateTime>();
            int             year      = givenyear;
            int             month     = givenmonth;
            int             startday  = Lawyer.GetDay("What day of the month will this " + word + " start?", month, year);
            int             endday    = Lawyer.GetDay("What day of the month will this " + word + " end?", month, year);
            DateTime        startdate = new DateTime(year, month, startday);
            DateTime        enddate   = new DateTime(year, month, endday);

            dates.Add(startdate);
            dates.Add(enddate);
            return(dates);
        }
コード例 #2
0
ファイル: Schedule.cs プロジェクト: grayingram/Scheduler
        private List <DateTime> GetDates(string word)
        {
            List <DateTime> dates     = new List <DateTime>();
            int             year      = Lawyer.GetYear("What year is this " + word + " be taking place?");
            int             month     = Lawyer.GetMonth("What numerical month is this " + word + " be taking place?");
            int             startday  = Lawyer.GetDay("What day of the month will this " + word + " start?", month, year);
            int             endday    = Lawyer.GetDay("What day of the month will this " + word + " end?", month, year);
            DateTime        startdate = new DateTime(year, month, startday);
            DateTime        enddate   = new DateTime(year, month, endday);

            dates.Add(startdate);
            dates.Add(enddate);
            return(dates);
        }