Skip to content

Commit

Permalink
Fix: #5022 - date diffs on 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Sep 21, 2024
1 parent dd592b9 commit 812fae1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/views/lists/anniversaries-list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ use Illuminate\Support\Collection;
<?php endif ?>
<div class="indent">
<?= $fact->label() . '' . $fact->date()->display($record->tree(), null, true) ?>
<?php if (PHP_INT_SIZE >= 8 || $fact->anniv <= 100) : ?>
<?php if (PHP_INT_SIZE >= 8 || $fact->date()->gregorianYear() > 1901) : ?>
(<?= Registry::timestampFactory()->now()->subtractYears($fact->anniv)->diffForHumans() ?>)
<?php else : ?>
(<?= I18N::plural('%s year', '%s years', $fact->anniv, I18N::number($fact->anniv)) ?>)
<?php endif ?>
<?php if ($fact->place()->gedcomName() !== '') : ?>
— <a href="<?= e($fact->place()->url()) ?>" title="<?= strip_tags($fact->place()->fullName()) ?>">
Expand Down

0 comments on commit 812fae1

Please sign in to comment.