setPattern($format); return $formatter->format($date); } public function number(float|string $number, int $decimal_places = 0): string { return number_format($number, $decimal_places, ',', '.'); } public function pesos(string $valor): string { return '$ ' . $this->number($valor); } public function ufs(string $valor): string { return $this->number($valor, 2) . ' UF'; } }