// 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: 0x06002FDA RID: 12250 RVA: 0x0011739C File Offset: 0x0011559C public static ExDateTime[] GetViewDaysForPublishedView(ISessionContext sessionContext, ExDateTime[] days, CalendarViewType viewType) { ExDateTime exDateTime = (days == null || days.Length == 0) ? DateTimeUtilities.GetLocalTime().Date : days[0]; switch (viewType) { case CalendarViewType.Min: if (days == null || days.Length == 0) { days = new ExDateTime[] { exDateTime }; } break; case CalendarViewType.Weekly: case CalendarViewType.WorkWeek: days = DateTimeUtilities.GetWeekFromDay(exDateTime, sessionContext.WeekStartDay, 62, viewType == CalendarViewType.WorkWeek); break; case CalendarViewType.Monthly: days = CalendarUtilities.GetViewDaysForMonthlyView(sessionContext, exDateTime); break; case CalendarViewType.WeeklyAgenda: case CalendarViewType.WorkWeeklyAgenda: { bool flag = viewType == CalendarViewType.WorkWeeklyAgenda; ExDateTime firstDay = DateTimeUtilities.GetWeekFromDay(exDateTime, sessionContext.WeekStartDay, 62, flag)[0]; days = CalendarUtilities.GetViewDaysForWeeklyAgenda(62, firstDay, flag); break; } } return(days); }