@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Month view header should display month name of the month completely shown, not leading or trailing month.

Summary: Fixes T8229, Month view header should display month name of the month completely shown, not leading or trailing month.

Test Plan: Open month view for May. Month view header should be May, not April.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8229

Differential Revision: https://secure.phabricator.com/D12887

+6 -5
+6 -5
src/view/phui/calendar/PHUICalendarMonthView.php
··· 62 62 63 63 require_celerity_resource('phui-calendar-month-css'); 64 64 65 - $first = reset($days); 66 - 67 65 foreach ($days as $day) { 68 66 $day_number = $day->format('j'); 69 67 ··· 144 142 $warnings = $this->getQueryRangeWarning(); 145 143 146 144 $box = id(new PHUIObjectBoxView()) 147 - ->setHeader($this->renderCalendarHeader($first)) 145 + ->setHeader($this->renderCalendarHeader($this->getDateTime())) 148 146 ->appendChild($table) 149 147 ->setFormErrors($warnings); 150 148 if ($this->error) { ··· 469 467 $year = $this->year; 470 468 471 469 list($next_year, $next_month) = $this->getNextYearAndMonth(); 470 + 472 471 $end_date = new DateTime("{$next_year}-{$next_month}-01", $timezone); 473 472 474 473 list($start_of_week, $end_of_week) = $this->getWeekStartAndEnd(); ··· 481 480 $first_weekday_of_month = $first_month_day_date->format('w'); 482 481 $last_weekday_of_month = $last_month_day_date->format('w'); 483 482 483 + $day_date = id(clone $first_month_day_date); 484 + 484 485 $num_days_display = $days_in_month; 485 486 if ($start_of_week !== $first_weekday_of_month) { 486 487 $interim_start_num = ($first_weekday_of_month + 7 - $start_of_week) % 7; 487 488 $num_days_display += $interim_start_num; 488 - $day_date = id(clone $first_month_day_date) 489 - ->modify('-'.$interim_start_num.' days'); 489 + 490 + $day_date->modify('-'.$interim_start_num.' days'); 490 491 } 491 492 if ($end_of_week !== $last_weekday_of_month) { 492 493 $interim_end_day_num = ($end_of_week - $last_weekday_of_month + 7) % 7;