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
F14062816: D12721.diff
Mon, Nov 18, 2:40 PM
F14046880: D12721.diff
Thu, Nov 14, 12:32 AM
F14033751: D12721.diff
Sat, Nov 9, 7:49 PM
F14021056: D12721.diff
Wed, Nov 6, 4:58 AM
F14008487: D12721.id30569.diff
Tue, Oct 29, 10:42 PM
F13979636: D12721.id.diff
Oct 19 2024, 5:36 AM
F13979277: D12721.diff
Oct 19 2024, 3:39 AM
F13978225: D12721.id30563.diff
Oct 18 2024, 10:11 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
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.