Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/calendar/PHUICalendarListView.php
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | private function getEventTooltip(AphrontCalendarEventView $event) { | ||||
$start = id(AphrontFormDateControlValue::newFromEpoch( | $start = id(AphrontFormDateControlValue::newFromEpoch( | ||||
$viewer, | $viewer, | ||||
$event->getEpochStart())); | $event->getEpochStart())); | ||||
$end = id(AphrontFormDateControlValue::newFromEpoch( | $end = id(AphrontFormDateControlValue::newFromEpoch( | ||||
$viewer, | $viewer, | ||||
$event->getEpochEnd())); | $event->getEpochEnd())); | ||||
$end_date = $end->getDateTime(); | |||||
$end_date = $end_date->modify('-1 second'); | |||||
$start_date = $start->getDateTime()->format('m d Y'); | $start_date = $start->getDateTime()->format('m d Y'); | ||||
$end_date = $end->getDateTime()->format('m d Y'); | $end_date = $end_date->format('m d Y'); | ||||
if ($event->getIsAllDay()) { | if ($event->getIsAllDay()) { | ||||
if ($start_date == $end_date) { | if ($start_date == $end_date) { | ||||
$tip = pht('All day'); | $tip = pht('All day'); | ||||
} else { | } else { | ||||
$tip = pht( | $tip = pht( | ||||
'All day, %s - %s', | 'All day, %s - %s', | ||||
$start->getValueAsFormat('M j, Y'), | $start->getValueAsFormat('M j, Y'), | ||||
Show All 27 Lines |