Changeset View
Changeset View
Standalone View
Standalone View
src/utils/viewutils.php
| <?php | <?php | ||||
| function _phutil_date_format($epoch) { | function phutil_date_format($epoch) { | ||||
| $now = time(); | $now = time(); | ||||
| $shift = 30 * 24 * 60 * 60; | $shift = 30 * 24 * 60 * 60; | ||||
| if ($epoch < $now + $shift && $epoch > $now - $shift) { | if ($epoch < $now + $shift && $epoch > $now - $shift) { | ||||
| $format = pht('D, M j'); | $format = pht('D, M j'); | ||||
| } else { | } else { | ||||
| $format = pht('M j Y'); | $format = pht('M j Y'); | ||||
| } | } | ||||
| return $format; | return $format; | ||||
| ▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines | |||||