API / Minn\Admin / Format

Format final class

Minn\Admin\Format · public/minn/src/Minn/Admin/Format.php · 51 lines

The dashboard's number, size, age, and title formatting.

Public

staticnumber(int|float $value, int $decimals = 0): string#

number_format_i18n for the default locale: comma thousands.

staticsize(int $bytes): string#

size_format with one decimal: 1024-step units, comma thousands.

statichumanTimeDiff(int $from, ?int $to = NULL): string#

Humanized age, pinned by an oracle capture table: each unit rounds, floors at 1, and hands off at the next unit boundary.

staticplainTitle(string $raw): string#

A post title as the feed shows it: texturized, entities decoded, tags gone.