Differential D16004 Diff 38526 src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
| Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | if ($display == 'month' || $display == 'day') { | ||||
| $next->modify('+1 month'); | $next->modify('+1 month'); | ||||
| } else if ($display == 'day') { | } else if ($display == 'day') { | ||||
| $next->modify('+7 day'); | $next->modify('+7 day'); | ||||
| } | } | ||||
| $display_start = $start_day->format('U'); | $display_start = $start_day->format('U'); | ||||
| $display_end = $next->format('U'); | $display_end = $next->format('U'); | ||||
| $preferences = $viewer->loadPreferences(); | $start_of_week = $viewer->getUserSetting( | ||||
| $pref_week_day = PhabricatorUserPreferences::PREFERENCE_WEEK_START_DAY; | PhabricatorWeekStartDaySetting::SETTINGKEY); | ||||
| $start_of_week = $preferences->getPreference($pref_week_day, 0); | |||||
| $end_of_week = ($start_of_week + 6) % 7; | $end_of_week = ($start_of_week + 6) % 7; | ||||
| $first_of_month = $start_day->format('w'); | $first_of_month = $start_day->format('w'); | ||||
| $last_of_month = id(clone $next)->modify('-1 day')->format('w'); | $last_of_month = id(clone $next)->modify('-1 day')->format('w'); | ||||
| if (!$min_range || ($min_range < $display_start)) { | if (!$min_range || ($min_range < $display_start)) { | ||||
| $min_range = $display_start; | $min_range = $display_start; | ||||
| ▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines | |||||