Skip to content

Commit ebe7b7b

Browse files
committed
Issues-533: Added Posts Count/Comments Count
1 parent bd05993 commit ebe7b7b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/vanilla/bootstrap.before.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function dateUpdated($row, $wrap = null) {
305305

306306
if ($dateUpdated) {
307307
$updateUser = Gdn::userModel()->getID($updateUserID);
308-
$dateUpdatedFormatted = formatDateCustom($dateUpdated);
308+
$dateUpdatedFormatted = formatDateCustom($dateUpdated, false);
309309
if ($updateUser && $insertUserID != $updateUserID) {
310310
$title = sprintf(t('Edited %s by %s.'), $dateUpdatedFormatted, val('Name', $updateUser));
311311
$link = userAnchor($updateUser);
@@ -990,8 +990,9 @@ function discussionUrl($discussion, $page = '', $withDomain = true) {
990990
}
991991

992992
if (!function_exists('formatDateCustom')) {
993-
function formatDateCustom($timestamp) {
994-
$dateFormatted = Gdn::getContainer()->get(DateTimeFormatter::class)->formatDate($timestamp, false, '%a, %b %e %Y');
993+
function formatDateCustom($timestamp, $showDayOfWeek=true) {
994+
$dateFormat = $showDayOfWeek? '%a, %b %e, %Y': '%b %e, %Y';
995+
$dateFormatted = Gdn::getContainer()->get(DateTimeFormatter::class)->formatDate($timestamp, false, $dateFormat);
995996
$timeFormatted = Gdn::getContainer()->get(DateTimeFormatter::class)->formatDate($timestamp, false, '%I:%M %p');
996997
return sprintf('%1$s at %2$s', $dateFormatted, $timeFormatted);
997998
}

0 commit comments

Comments
 (0)