mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Revert "Mark date and time format translatable"
This reverts commit e3eb8d55c5
.
This commit is contained in:
parent
081c3a24b0
commit
24a025becb
1 changed files with 6 additions and 6 deletions
|
@ -54,21 +54,21 @@ function phabricator_time($epoch, $user) {
|
|||
return phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
pht('g:i A'));
|
||||
'g:i A');
|
||||
}
|
||||
|
||||
function phabricator_datetime($epoch, $user) {
|
||||
function phabricator_datetime($epoch, $user) {
|
||||
return phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
pht('%s, g:i A', _phabricator_date_format($epoch)));
|
||||
_phabricator_date_format($epoch).', g:i A');
|
||||
}
|
||||
|
||||
function _phabricator_date_format($epoch) {
|
||||
$format = pht('M j Y');
|
||||
$format = 'M j Y';
|
||||
$now = time();
|
||||
if ($epoch <= $now && $epoch > $now - 30 * 24 * 60 * 60) {
|
||||
$format = pht('D, M j');
|
||||
$format = 'D, M j';
|
||||
}
|
||||
return $format;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ function phabricator_format_local_time($epoch, $user, $format) {
|
|||
|
||||
$date->setTimeZone($zone);
|
||||
|
||||
return PhutilTranslator::getInstance()->translateDate($format, $date);
|
||||
return $date->format($format);
|
||||
}
|
||||
|
||||
function phabricator_format_relative_time($duration) {
|
||||
|
|
Loading…
Reference in a new issue