aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorJonathan Stanley <shs@users.sourceforge.net>2007-04-24 00:11:20 +0000
committerJonathan Stanley <shs@users.sourceforge.net>2007-04-24 00:11:20 +0000
commit5ebb018cb895a8ae6a52f6bdd9606e4bd5df83e4 (patch)
tree0bd99dafed32e103f695a3a71fb3ba4a11a73fc7 /phpBB/includes/acp
parent56e83ff4ea36362e264daa593115736054d388a7 (diff)
downloadforums-5ebb018cb895a8ae6a52f6bdd9606e4bd5df83e4.tar
forums-5ebb018cb895a8ae6a52f6bdd9606e4bd5df83e4.tar.gz
forums-5ebb018cb895a8ae6a52f6bdd9606e4bd5df83e4.tar.bz2
forums-5ebb018cb895a8ae6a52f6bdd9606e4bd5df83e4.tar.xz
forums-5ebb018cb895a8ae6a52f6bdd9606e4bd5df83e4.zip
#10067
Never noticed the date output in the dropdown was dynamic... so made sense to actually use the relative days feature to _actually show_ how it works by placing "Today" within the date, and append it with a date of how it'd be formatted it it wasn't yesterday/today/tomorrow by offsetting the time() by 1 year negatively. Bonus is that the RELATIVE_DAYS variable is no longer needed, though have switched that for a VARIANT_DATE_SEPARATOR variable incase people want to localise " / " (could have been hardcoded, but you never know! :P) The YESTERDAY/TODAY/TOMORROW variables have also had their trailing commas nuked (the comma has gone into the date format code) as people whom want: "d M Y @ H:i:s" => "01 Jan 2007 @ 13:37:00" ... enabling relative days with: "|d M Y| @ H:i:s" ... would have got: "Today, @ 13:37:00" ... but now they shall get: "Today @ 13:37:00" Lastly, added a relative date option for those prefering middle-endian dates with am/pm time. git-svn-id: file:///svn/phpbb/trunk@7391 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_board.php2
-rw-r--r--phpBB/includes/acp/acp_users.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 8f29fdf43f..d3a6e9da6f 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -767,7 +767,7 @@ class acp_board
foreach ($user->lang['dateformats'] as $format => $null)
{
$dateformat_options .= '<option value="' . $format . '"' . (($format == $value) ? ' selected="selected"' : '') . '>';
- $dateformat_options .= $user->format_date(time(), $format, true) . ((strpos($format, '|') !== false) ? ' [' . $user->lang['RELATIVE_DAYS'] . ']' : '');
+ $dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time() - 31536000, $format, true) : '');
$dateformat_options .= '</option>';
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 5df9c418dc..d3dd8ee7c3 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1235,7 +1235,7 @@ class acp_users
foreach ($user->lang['dateformats'] as $format => $null)
{
$dateformat_options .= '<option value="' . $format . '"' . (($format == $data['dateformat']) ? ' selected="selected"' : '') . '>';
- $dateformat_options .= $user->format_date(time(), $format, true) . ((strpos($format, '|') !== false) ? ' [' . $user->lang['RELATIVE_DAYS'] . ']' : '');
+ $dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time() - 31536000, $format, true) : '');
$dateformat_options .= '</option>';
}