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
Unknown Object (File)
Mon, Dec 2, 10:04 PM
Unknown Object (File)
Tue, Nov 26, 6:10 PM
Unknown Object (File)
Fri, Nov 22, 2:32 PM
Unknown Object (File)
Nov 18 2024, 2:40 PM
Unknown Object (File)
Nov 14 2024, 12:32 AM
Unknown Object (File)
Nov 9 2024, 7:49 PM
Unknown Object (File)
Nov 6 2024, 4:58 AM
Unknown Object (File)
Oct 29 2024, 10:42 PM
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 5775
Build 5794: [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
405–448

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.