Initial import of animal_management module

This commit is contained in:
Kelin Rescue Hub
2026-04-04 13:13:00 -04:00
commit 20adb1bd1e
65 changed files with 14004 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace humhub\modules\animal_management\helpers;
use Yii;
class DateDisplayHelper
{
public const DATETIME_FORMAT = 'php:m/d/Y h:i A';
public static function format(?string $value): string
{
$value = trim((string)$value);
if ($value === '') {
return '';
}
$timestamp = strtotime($value);
if ($timestamp === false) {
return $value;
}
return Yii::$app->formatter->asDatetime($timestamp, self::DATETIME_FORMAT);
}
}