public ToyzWeekObject getNextWeek() { DateTime nextDt = this.sat.AddDays(1); ToyzWeekObject week = new ToyzWeekObject(nextDt); return(week); }
public ToyzWeekObject getLastWeek() { DateTime lastDt = this.sun.AddDays(-1); ToyzWeekObject week = new ToyzWeekObject(lastDt); return(week); }
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); }