Add relative date support

Changed Date display to be relative.  If the relative date is hovered over it shows the actual date and time.
This commit is contained in:
chrislemonier 2014-02-25 12:14:25 -08:00
parent 1c224eb08a
commit e554be6d22

View File

@ -38,7 +38,8 @@
<?php if ($feed['last_checked']): ?> <?php if ($feed['last_checked']): ?>
<time class="feed-last-checked" id="last-checked-feed-<?= $feed['id'] ?>" data-after-update="<?= t('updated just now') ?>"> <time class="feed-last-checked" id="last-checked-feed-<?= $feed['id'] ?>" data-after-update="<?= t('updated just now') ?>">
<?= t('checked at').' '.dt('%e %B %Y %k:%M', $feed['last_checked']) ?> <?= t('updated' ) ?>
<span title="<?= dt('%e %B %Y %k:%M', $feed['last_checked']) ?>"><?= Helper\relative_time(dt('%e %B %Y %k:%M', $feed['last_checked'])) ?></span>
</time> </time>
<?php else: ?> <?php else: ?>
<span class="feed-last-checked" id="last-checked-feed-<?= $feed['id'] ?>" data-after-update="<?= t('now') ?>"> <span class="feed-last-checked" id="last-checked-feed-<?= $feed['id'] ?>" data-after-update="<?= t('now') ?>">