Adapt relative date logic from F# version

This commit is contained in:
2024-06-22 18:13:45 -04:00
parent b759c3494e
commit 3ebb03d470
4 changed files with 92 additions and 39 deletions

View File

@@ -30,8 +30,8 @@ Layout::pageHead('Full Request');?>
<div class=card-body>
<h6 class="card-subtitle text-muted mb-2"><?php
if (!is_null($answered)) { ?>
Answered <?=$answered->format('F j, Y')?> (<?php UI::relativeDate($req->history[0]->asOf); ?>)
&bull;<?php
Answered <?=$answered->format('F j, Y')?>
(<?=UI::formatDistance('now', $req->history[0]->asOf);?>) &bull;<?php
} ?>
Prayed <?=number_format($prayed)?> times &bull; Open <?=number_format($daysOpen)?> days
</h6>