mini\I18n\Fmt
class
Documentation
Stateless formatting utility that queries the current request locale
All methods query the current locale via \Locale::getDefault() and delegate to PHP's intl classes. This class holds no state - it's purely a convenience wrapper that reads request state on each call.
Date/time methods accept DateTimeInterface or SQL datetime strings (assumed UTC). All output is converted to the application timezone (date_default_timezone_get()).
Methods (10)
Normalize date input to DateTimeImmutable in local timezone.
Format a number with specified decimal places
Format currency with explicit currency code
Format percentage (0.75 -> "75%")
Format file size in human-readable format
Format date in short format (e.g., "12/31/2023", "31.12.2023")
Format date in long format (e.g., "December 31, 2023", "31. desember 2023")
Format time in short format (e.g., "2:30 PM", "14:30")
Format datetime in short format
Format datetime in long format