Auth, Login, Home, Venta->Listados->Precios

This commit is contained in:
Juan Pablo Vial
2023-07-24 20:55:26 -04:00
parent d9d5a15376
commit 1a7b10ce3c
130 changed files with 4302 additions and 0 deletions

View File

@ -0,0 +1,24 @@
<?php
namespace Incoviba\Service;
use DateTimeImmutable;
use IntlDateFormatter;
class Format
{
public function localDate(string $valor, string $format, bool $print = false): string
{
$date = new DateTimeImmutable($valor);
$formatter = new IntlDateFormatter('es_ES');
if ($format == null) {
$format = 'DD [de] MMMM [de] YYYY';
}
$formatter->setPattern($format);
return $formatter->format($date);
}
public function pesos(string $valor): string
{
return '$' . number_format($valor, 0, ',', '.');
}
}