Skip to main content

Home/ Wordpress/ Group items tagged php spanish

Rss Feed Group items tagged

Luciano Ferrer

Convertir fechas de PHP a castellano - 2 views

  •  
    "function fechaCastellano ($fecha) { $fecha = substr($fecha, 0, 10); $numeroDia = date('d', strtotime($fecha)); $dia = date('l', strtotime($fecha)); $mes = date('F', strtotime($fecha)); $anio = date('Y', strtotime($fecha)); $dias_ES = array("Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"); $dias_EN = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); $nombredia = str_replace($dias_EN, $dias_ES, $dia); $meses_ES = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"); $meses_EN = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $nombreMes = str_replace($meses_EN, $meses_ES, $mes); return $nombredia." ".$numeroDia." de ".$nombreMes." de ".$anio; }"
1 - 1 of 1
Showing 20 items per page