mini\I18n\Fmt::ensureDateTime() Method

private static

Signature

private static function ensureDateTime(DateTimeInterface|string $datetime): DateTimeImmutable

Parameters

Name Type Default Description
$datetime DateTimeInterface|string required Documentation missing

Returns

DateTimeImmutable

Documentation

Normalize date input to DateTimeImmutable in local timezone.

Strings are assumed to be UTC (e.g., from database).

Source

src/I18n/Fmt.php:22-31