1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-25 14:08:19 +01:00

Revert "Mark date and time format translatable"

This reverts commit e3eb8d55c5.
This commit is contained in:
Andrew Gallagher 2012-06-27 19:07:12 -07:00
parent 081c3a24b0
commit 24a025becb

View file

@ -54,21 +54,21 @@ function phabricator_time($epoch, $user) {
return phabricator_format_local_time( return phabricator_format_local_time(
$epoch, $epoch,
$user, $user,
pht('g:i A')); 'g:i A');
} }
function phabricator_datetime($epoch, $user) { function phabricator_datetime($epoch, $user) {
return phabricator_format_local_time( return phabricator_format_local_time(
$epoch, $epoch,
$user, $user,
pht('%s, g:i A', _phabricator_date_format($epoch))); _phabricator_date_format($epoch).', g:i A');
} }
function _phabricator_date_format($epoch) { function _phabricator_date_format($epoch) {
$format = pht('M j Y'); $format = 'M j Y';
$now = time(); $now = time();
if ($epoch <= $now && $epoch > $now - 30 * 24 * 60 * 60) { if ($epoch <= $now && $epoch > $now - 30 * 24 * 60 * 60) {
$format = pht('D, M j'); $format = 'D, M j';
} }
return $format; return $format;
} }
@ -115,7 +115,7 @@ function phabricator_format_local_time($epoch, $user, $format) {
$date->setTimeZone($zone); $date->setTimeZone($zone);
return PhutilTranslator::getInstance()->translateDate($format, $date); return $date->format($format);
} }
function phabricator_format_relative_time($duration) { function phabricator_format_relative_time($duration) {