@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.

Probably fix some display issues with all-day events?

Summary:
Ref T11801. These are pretty fiddly because users expect to see the end time for timed events ("10 AM - 11 AM" is ONE hour long) but not for all-day events ("Nov 2 - Nov 3" is TWO days long!)

We also want to store the thing the user actually entered so we don't lose data if they un-all-day the event later.

This may take a little more fiddling since it feels a little shaky, but I couldn't break this version immediately.

Test Plan: Imported a French holiday, got proper display in the UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11801

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

+12 -2
+8 -1
src/applications/calendar/storage/PhabricatorCalendarEvent.php
··· 593 593 $min_date = $start->newPHPDateTime(); 594 594 $max_date = $end->newPHPDateTime(); 595 595 596 + // Subtract one second since the stored date is exclusive. 597 + $max_date = $max_date->modify('-1 second'); 598 + 596 599 $min_day = $min_date->format('Y m d'); 597 600 $max_day = $max_date->format('Y m d'); 598 601 ··· 849 852 // If this is an all day event, we move the end date time forward to the 850 853 // first second of the following day. This is consistent with what users 851 854 // expect: an all day event from "Nov 1" to "Nov 1" lasts the entire day. 852 - if ($this->getIsAllDay()) { 855 + 856 + // For imported events, the end date is already stored with this 857 + // adjustment. 858 + 859 + if ($this->getIsAllDay() && !$this->isImportedEvent()) { 853 860 $datetime = $datetime 854 861 ->newAbsoluteDateTime() 855 862 ->setHour(0)
+4 -1
src/view/phui/calendar/PHUICalendarListView.php
··· 198 198 $viewer, 199 199 $event->getEpochEnd())); 200 200 201 + $end_date = $end->getDateTime(); 202 + $end_date = $end_date->modify('-1 second'); 203 + 201 204 $start_date = $start->getDateTime()->format('m d Y'); 202 - $end_date = $end->getDateTime()->format('m d Y'); 205 + $end_date = $end_date->format('m d Y'); 203 206 204 207 if ($event->getIsAllDay()) { 205 208 if ($start_date == $end_date) {