Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15414939
D12887.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12887.diff
View Options
diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php
--- a/src/view/phui/calendar/PHUICalendarMonthView.php
+++ b/src/view/phui/calendar/PHUICalendarMonthView.php
@@ -62,8 +62,6 @@
require_celerity_resource('phui-calendar-month-css');
- $first = reset($days);
-
foreach ($days as $day) {
$day_number = $day->format('j');
@@ -144,7 +142,7 @@
$warnings = $this->getQueryRangeWarning();
$box = id(new PHUIObjectBoxView())
- ->setHeader($this->renderCalendarHeader($first))
+ ->setHeader($this->renderCalendarHeader($this->getDateTime()))
->appendChild($table)
->setFormErrors($warnings);
if ($this->error) {
@@ -469,6 +467,7 @@
$year = $this->year;
list($next_year, $next_month) = $this->getNextYearAndMonth();
+
$end_date = new DateTime("{$next_year}-{$next_month}-01", $timezone);
list($start_of_week, $end_of_week) = $this->getWeekStartAndEnd();
@@ -481,12 +480,14 @@
$first_weekday_of_month = $first_month_day_date->format('w');
$last_weekday_of_month = $last_month_day_date->format('w');
+ $day_date = id(clone $first_month_day_date);
+
$num_days_display = $days_in_month;
if ($start_of_week !== $first_weekday_of_month) {
$interim_start_num = ($first_weekday_of_month + 7 - $start_of_week) % 7;
$num_days_display += $interim_start_num;
- $day_date = id(clone $first_month_day_date)
- ->modify('-'.$interim_start_num.' days');
+
+ $day_date->modify('-'.$interim_start_num.' days');
}
if ($end_of_week !== $last_weekday_of_month) {
$interim_end_day_num = ($end_of_week - $last_weekday_of_month + 7) % 7;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 3:12 AM (3 d, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7352029
Default Alt Text
D12887.diff (1 KB)
Attached To
Mode
D12887: Month view header should display month name of the month completely shown, not leading or trailing month.
Attached
Detach File
Event Timeline
Log In to Comment