// Token: 0x06002FDB RID: 12251 RVA: 0x00117464 File Offset: 0x00115664 public static ExDateTime[] GetViewDays(UserContext userContext, ExDateTime[] days, CalendarViewType viewType, OwaStoreObjectId folderId, FolderViewStates viewStates) { ExDateTime exDateTime = (days == null || days.Length == 0) ? DateTimeUtilities.GetLocalTime().Date : days[0]; switch (viewType) { case CalendarViewType.Min: if (days == null || days.Length == 0) { int dailyViewDays = viewStates.DailyViewDays; days = new ExDateTime[dailyViewDays]; for (int i = 0; i < dailyViewDays; i++) { days[i] = exDateTime; exDateTime = exDateTime.IncrementDays(1); } } break; case CalendarViewType.Weekly: days = DateTimeUtilities.GetWeekFromDay(exDateTime, userContext.UserOptions.WeekStartDay, 0, false); break; case CalendarViewType.WorkWeek: days = DateTimeUtilities.GetWeekFromDay(exDateTime, userContext.UserOptions.WeekStartDay, CalendarUtilities.GetWorkDays(userContext, folderId), true); break; case CalendarViewType.Monthly: days = CalendarUtilities.GetViewDaysForMonthlyView(userContext, exDateTime); break; case CalendarViewType.WeeklyAgenda: case CalendarViewType.WorkWeeklyAgenda: { ExDateTime firstDay = CalendarUtilities.GetWeekDays(folderId, userContext, exDateTime, false)[0]; int workDays = CalendarUtilities.GetWorkDays(userContext, folderId); days = CalendarUtilities.GetViewDaysForWeeklyAgenda(workDays, firstDay, viewType == CalendarViewType.WorkWeeklyAgenda); break; } } return(days); }
// Token: 0x06002FE3 RID: 12259 RVA: 0x001177EC File Offset: 0x001159EC public static ExDateTime[] GetWeekDays(OwaStoreObjectId folderId, UserContext userContext, ExDateTime dayInWeek, bool isWorkWeek) { ExDateTime[] weekFromDay; if (isWorkWeek) { weekFromDay = DateTimeUtilities.GetWeekFromDay(dayInWeek, userContext.UserOptions.WeekStartDay, CalendarUtilities.GetWorkDays(userContext, folderId), true); } else { weekFromDay = DateTimeUtilities.GetWeekFromDay(dayInWeek, userContext.UserOptions.WeekStartDay, 0, false); } return(weekFromDay); }