Optics (---- instead of 31.12.2099 for UI)

This commit is contained in:
int2001
2025-08-24 16:42:23 +00:00
parent 2b50a6c981
commit bd1ca21e05
2 changed files with 21 additions and 3 deletions

View File

@@ -33,13 +33,19 @@
<tbody>
<?php foreach ($dcl_keys as $row) {
usort($row->Callsigns, fn($a, $b) => $a->startDate <=> $b->startDate);
foreach ($row->Callsigns as $dcl_call) {
if (($dcl_call->endDate ?? '') == '') {
$dcl_call->endDate='-------';
} else {
$dcl_call->endDate=date($date_format,strtotime($dcl_call->endDate));
}
?>
<tr>
<td><?php echo $dcl_call->callsign; ?></td>
<?php
$vf = date($date_format,strtotime($dcl_call->startDate));
$vt = date($date_format,strtotime($dcl_call->endDate ?? '2099-12-31'));
$vt = $dcl_call->endDate;
?>
<td><?php echo $vf; ?></td>
<td><?php echo $vt; ?></td>

View File

@@ -24,10 +24,16 @@
<th><?= __("Validity"); ?></th>
</tr>
<?php
usort($dcl_info->DOKs, fn($a, $b) => $a->startDate <=> $b->startDate);
foreach ($dcl_info->DOKs as $key => $value) {
if (($value->endDate ?? '') == '') {
$value->endDate='-------';
} else {
$value->endDate=date($date_format,strtotime($value->endDate));
}
echo "<tr>";
echo "<td>".$value->dok."</td>";
echo "<td>".date($date_format,strtotime($value->startDate)).' - '.(date($date_format,strtotime($value->endDate ?? '20991231')))."</td>";
echo "<td>".date($date_format,strtotime($value->startDate)).' - '.$value->endDate."</td>";
echo "</tr>";
}
?>
@@ -40,10 +46,16 @@
<th><?= __("Validity"); ?></th>
</tr>
<?php
usort($dcl_info->Callsigns, fn($a, $b) => $a->startDate <=> $b->startDate);
foreach ($dcl_info->Callsigns as $key => $value) {
if (($value->endDate ?? '') == '') {
$value->endDate='-------';
} else {
$value->endDate=date($date_format,strtotime($value->endDate));
}
echo "<tr>";
echo "<td>".$value->callsign."</td>";
echo "<td>".date($date_format,strtotime($value->startDate)).' - '.(date($date_format,strtotime($value->endDate ?? '20991231')))."</td>";
echo "<td>".date($date_format,strtotime($value->startDate)).' - '.$value->endDate."</td>";
echo "</tr>";
}
echo "</table>";