Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14037616
D13290.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13290.diff
View Options
diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php
--- a/src/view/phui/calendar/PHUICalendarListView.php
+++ b/src/view/phui/calendar/PHUICalendarListView.php
@@ -141,6 +141,12 @@
}
private function getEventTooltip(AphrontCalendarEventView $event) {
+ $viewer = $this->getUser();
+ $preferences = $viewer->loadPreferences();
+ $time_pref = $preferences->getPreference(
+ PhabricatorUserPreferences::PREFERENCE_TIME_FORMAT,
+ 'g:i A');
+
Javelin::initBehavior('phabricator-tooltips');
$start = id(AphrontFormDateControlValue::newFromEpoch(
@@ -166,13 +172,13 @@
if ($start->getValueDate() == $end->getValueDate()) {
$tip = pht(
'%s - %s',
- $start->getValueAsFormat('g:i A'),
- $end->getValueAsFormat('g:i A'));
+ $start->getValueAsFormat($time_pref),
+ $end->getValueAsFormat($time_pref));
} else {
$tip = pht(
'%s - %s',
- $start->getValueAsFormat('M j, Y, g:i A'),
- $end->getValueAsFormat('M j, Y, g:i A'));
+ $start->getValueAsFormat('M j, Y, '.$time_pref),
+ $end->getValueAsFormat('M j, Y, '.$time_pref));
}
}
return $tip;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 11, 5:35 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6711128
Default Alt Text
D13290.diff (1 KB)
Attached To
Mode
D13290: Make event lists respect the user preference for time format.
Attached
Detach File
Event Timeline
Log In to Comment