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
F13149250: D12721.diff
Sat, May 4, 7:28 AM
Unknown Object (File)
Fri, May 3, 11:49 AM
Unknown Object (File)
Thu, Apr 25, 2:51 AM
Unknown Object (File)
Sat, Apr 20, 4:25 AM
Unknown Object (File)
Sat, Apr 20, 4:25 AM
Unknown Object (File)
Sat, Apr 20, 4:24 AM
Unknown Object (File)
Sat, Apr 20, 4:24 AM
Unknown Object (File)
Sat, Apr 20, 4:19 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
Branch
calendardayviewforwardbackcontrols
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 5778
Build 5797: [Placeholder Plan] Wait for 30 Seconds

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.