Use DateFormatter::formatDate() for formatting the date and time tooltip in the format view helper

refs #6678
This commit is contained in:
Eric Lippmann 2015-05-19 10:04:17 +02:00
parent 7212c038f1
commit 1301b77547
1 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ $this->addHelperFunction('timeAgo', function ($time, $timeOnly = false) {
}
return sprintf(
'<span class="time-ago" title="%s">%s</span>',
date('Y-m-d H:i:s', $time), // TODO: internationalized format
DateFormatter::formatDate($time),
DateFormatter::timeAgo($time, $timeOnly)
);
});
@ -27,7 +27,7 @@ $this->addHelperFunction('timeSince', function ($time, $timeOnly = false) {
}
return sprintf(
'<span class="time-since" title="%s">%s</span>',
date('Y-m-d H:i:s', $time), // TODO: internationalized format
DateFormatter::formatDate($time),
DateFormatter::timeSince($time, $timeOnly)
);
});
@ -38,7 +38,7 @@ $this->addHelperFunction('timeUntil', function ($time, $timeOnly = false) {
}
return sprintf(
'<span class="time-until" title="%s">%s</span>',
date('Y-m-d H:i:s', $time), // TODO: internationalized format
DateFormatter::formatDate($time),
DateFormatter::timeUntil($time, $timeOnly)
);
});