Beispiel #1
0
 public function formatos()
 {
     $this->render(null, null);
     Load::lib("formato");
     echo "UTF8: " . Formato::utf8("México") . "<br />";
     echo "Normal: " . "México" . "<br />";
     echo "ISO8859-1: " . Formato::iso88591("México") . "<br />";
     echo "<br />";
     echo "Numero: " . Formato::numero(738374) . "<br />";
     echo "Dinero: " . Formato::dinero(738374) . "<br />";
     echo "Ceros: " . Formato::ceros(73, 5) . "<br />";
     echo "<br />";
     echo "Numero con Letra: " . Formato::numeroLetra(738374) . "<br />";
     echo "<br />";
     echo "Mayusculas: " . Formato::mayusculas("Lorem Ipsum is simply dummy text of the printing and typesetting industry") . "<br />";
     echo "Minusculas: " . Formato::minusculas("Lorem Ipsum is simply dummy text of the printing and typesetting industry") . "<br />";
     echo "Capital: " . Formato::capital("Lorem Ipsum is simply dummy text of the printing and typesetting industry") . "<br />";
     echo "Texto: " . Formato::texto("clientes_distinguidos") . "<br />";
     echo "Camello: " . Formato::camello("clientes_distinguidos") . "<br />";
     echo "InversaCamello: " . Formato::inversaCamello("facturasEmitidasMes") . "<br />";
     echo "<br />";
     echo "Fecha: " . Formato::fecha(date("Y-m-d")) . "<br />";
     echo "Fecha DB: " . Formato::fechaDB(date("d/m/Y")) . "<br />";
     echo "Hora: " . Formato::hora(452) . "<br />";
 }
Beispiel #2
0
 public static function hora($mins)
 {
     $m = floor($mins % 60);
     $h = floor($mins / 60);
     return Formato::ceros($h, 2) . ":" . Formato::ceros($m, 2);
 }
Beispiel #3
0
 public function mensajeId()
 {
     Load::lib("formato");
     return "TXTMN" . Formato::ceros(rand(0, 1000000), 8);
 }