fix: use IntlDateFormatter instead of strftime
This CL introduces breaking changes, since it uses non-constant static
variable initializers, which are only available since PHP 8.3. Thus, the
codebase now only supports PHP 8.3 (and the docs have been modified to
reflect this and the fact that the Intl extension is necessary).
Fixed: hores:2
GitOrigin-RevId: 9a91312c96b90fa4c9ae5fc5f6e972fd95c9cd57
diff --git a/src/inc/incidentsView.php b/src/inc/incidentsView.php
index 1f90bc8..5bd0bda 100644
--- a/src/inc/incidentsView.php
+++ b/src/inc/incidentsView.php
@@ -119,7 +119,7 @@
<?php
}
?>
- <td class="can-strike"><?=strftime("%d %b %Y", $incident["day"])." ".security::htmlsafe($incident["allday"] ? "(todo el día)" : schedules::sec2time($incident["begins"])."-".schedules::sec2time($incident["ends"]))?></td>
+ <td class="can-strike"><?=date::getShortDate($incident["day"])." ".security::htmlsafe($incident["allday"] ? "(todo el día)" : schedules::sec2time($incident["begins"])."-".schedules::sec2time($incident["ends"]))?></td>
<td>
<a href="dynamic/editincidentcomment.php?id=<?=(int)$incident["id"]?>&continue=<?=$safeContinueUrl?>" data-dyndialog-href="dynamic/editincidentcomment.php?id=<?=(int)$incident["id"]?>&continue=<?=$safeContinueUrl?>" class="mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect" title="Ver/editar las observaciones"><i class="material-icons icon"><?=(empty($incident["details"]) && empty($incident["workerdetails"]) ? "mode_" : "")?>comment</i></a>
<span<?=($attachments > 0 ? ' class="mdl-badge mdl-badge--overlap" data-badge="'.$attachments.'"' : '')?>><a href="dynamic/incidentattachments.php?id=<?=(int)$incident["id"]?>&continue=<?=$safeContinueUrl?>" data-dyndialog-href="dynamic/incidentattachments.php?id=<?=(int)$incident["id"]?>&continue=<?=$safeContinueUrl?>" class="mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect" title="Ver/gestionar los archivos adjuntos"><i class="material-icons icon">attach_file</i></a></span>