예제 #1
0
        public ToyzWeekObject getNextWeek()
        {
            DateTime       nextDt = this.sat.AddDays(1);
            ToyzWeekObject week   = new ToyzWeekObject(nextDt);

            return(week);
        }
예제 #2
0
        public ToyzWeekObject getLastWeek()
        {
            DateTime       lastDt = this.sun.AddDays(-1);
            ToyzWeekObject week   = new ToyzWeekObject(lastDt);

            return(week);
        }
예제 #3
0
        public ToyzWeekObject getDiffWeek(int diff)
        {
            ToyzWeekObject week = this;

            if (diff < 0)
            {
                for (int i = 0; i < diff; i++)
                {
                    week = week.getLastWeek();
                }
            }
            else if (diff > 0)
            {
                for (int i = 0; i < diff; i++)
                {
                    week = week.getNextWeek();
                }
            }
            return(week);
        }