Page MenuHomePhabricator

Calendar UI doesn't honor user time format preferences in day view
Closed, ResolvedPublic

Description

The following patch does the trick, but I'm not sure, if that's the right way to fix it.
(Maybe "hour_meridian" should be renamed to "hour_in_view" or something like that?)

Regards,
Peter

--- a/src/view/phui/calendar/PHUICalendarDayView.php
+++ b/src/view/phui/calendar/PHUICalendarDayView.php
@@ -61,7 +61,7 @@ final class PHUICalendarDayView extends AphrontView {
     foreach ($hours as $hour) {
       $js_hours[] = array(
         'hour' => $hour->format('G'),
-        'hour_meridian' => $hour->format('g A'),
+        'hour_meridian' => phabricator_time($hour->getTimestamp(), $viewer),
       );
     }

Revisions and Commits

Restricted Differential Revision

Event Timeline

peter.schlaile assigned this task to lpriestley.
peter.schlaile updated the task description. (Show Details)
peter.schlaile added a project: Calendar.
peter.schlaile added a subscriber: peter.schlaile.

As a heads up, Calendar is a prototype application, and is generally expected to be buggy, incomplete, and not "production ready".

https://secure.phabricator.com/book/phabricator/article/prototypes/

epriestley triaged this task as Normal priority.
epriestley moved this task from Backlog to Unprototype (v1) on the Calendar board.
epriestley added a subscriber: lpriestley.
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Jul 13 2016, 10:39 PM
epriestley added a commit: Restricted Diffusion Commit.