Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/12/2015, 11:14
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 10 meses
Puntos: 379
Respuesta: Cambiar Fecha YYYY-mm-dd a 0000-ene, 0000-feb...

Utiliza la extensión intl: http://php.net/manual/es/book.intl.php para formatear la fecha,
Código PHP:
Ver original
  1. //creas una instancia para tu region
  2. $fmt = new IntlDateFormatter(
  3.     "es_ES" ,
  4.     IntlDateFormatter::FULL,
  5.     IntlDateFormatter::FULL,
  6.     'America/New_York',
  7.     IntlDateFormatter::GREGORIAN,
  8.     "yyyy'-'MMMM "
  9. );
  10.  
  11. $date = new DateTime('2015-12-24 14:30:10'); //la fecha de tu base de datos
  12.  
  13. echo utf8_decode(ucwords($fmt->format($date), '-')); //2015-Diciembre
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.