Page MenuHomePhabricator

Calendar day view should have forward/back controls to scroll through days
ClosedPublic

Authored by lpriestley on May 5 2015, 7:03 PM.
Tags
None
Referenced Files
F15515859: D12721.id30568.diff
Fri, Apr 18, 1:50 PM
F15504259: D12721.id30562.diff
Mon, Apr 14, 5:01 PM
F15502103: D12721.diff
Sun, Apr 13, 10:40 PM
F15464279: D12721.diff
Wed, Apr 2, 8:07 AM
F15458146: D12721.id30569.diff
Sun, Mar 30, 9:09 PM
F15399169: D12721.id.diff
Mar 17 2025, 3:10 AM
F15375439: D12721.id30562.diff
Mar 12 2025, 11:14 PM
F15337640: D12721.diff
Mar 9 2025, 6:53 AM
Subscribers

Details

Summary

Ref T4393, Calendar day view should have forward/back controls to scroll through days

Test Plan

Open day view on first or last day of the month, scrolling backwards or forwards through days should correctly calculate the date of the next day and the previous day and correctly find events.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lpriestley retitled this revision from to Calendar day view should have forward/back controls to scroll through days.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
lpriestley edited edge metadata.

Fixing getPrevDay logic

epriestley edited edge metadata.
epriestley added inline comments.
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
407–427

Now that calendarDay is in full use, we should merge these two nearly identical functions into one that does all three parts.

src/view/phui/calendar/PHUICalendarDayView.php
256

At first, I thought this would return a list of days. Maybe getNumberOfDaysInMonth()?

279

You might be able to simplify this logic by doing:

$prev = new DateTime("{$year}-{$month}-{$day}", $zone);
$prev->modify('-1 day');
return array(
  $prev->format('Y'),
  $prev->fomat('m'),
  $prev->format('d'),
);

I'm only like 80% sure that actually works.

This revision is now accepted and ready to land.May 5 2015, 7:13 PM
lpriestley marked an inline comment as done.
lpriestley edited edge metadata.

Renaming and merging methods

This revision was automatically updated to reflect the committed changes.