xref: /webtrees/resources/views/components/datetime.phtml (revision 1ff45046fabc22237b5d0d8e489c96f031fc598d)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Timestamp;
6use Fisharebest\Webtrees\I18N;
7
8/**
9 * @var Timestamp $timestamp
10 */
11?>
12
13<?php if ($timestamp->timestamp() === 0) : ?>
14    <span class="wt-timestamp">
15        <?= I18N::translate('Never') ?>
16    </span>
17<?php else : ?>
18    <span class="wt-timestamp" title="<?= e($timestamp->diffForHumans()) ?>" dir="auto">
19        <?= e($timestamp->isoFormat('LLLL')) ?>
20    </span>
21<?php endif ?>
22