Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / customfield / PhabricatorUserSinceField.php
blob7b15359ca6de7f5453c48baa1b7c83ecfe5adb65
1 <?php
3 final class PhabricatorUserSinceField
4 extends PhabricatorUserCustomField {
6 private $value;
8 public function getFieldKey() {
9 return 'user:since';
12 public function getFieldName() {
13 return pht('User Since');
16 public function getFieldDescription() {
17 return pht('Shows user join date.');
20 public function shouldAppearInPropertyView() {
21 return true;
24 public function renderPropertyViewValue(array $handles) {
25 $absolute = phabricator_datetime(
26 $this->getObject()->getDateCreated(),
27 $this->getViewer());
29 $relative = phutil_format_relative_time_detailed(
30 time() - $this->getObject()->getDateCreated(),
31 $levels = 2);
33 return hsprintf('%s (%s)', $absolute, $relative);