Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/08/2015, 08:16
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: dia de la semana que pertenece una fecha

Puedes hacerlo con la clase DateTime y la extensión Intl para localizar el día a español
Código PHP:
Ver original
  1. $date = DateTime::createFromFormat('2015-08-05 22:30:00','America/Monterrey');
  2.  
  3. $fmt = new IntlDateFormatter(
  4.             "es_ES" ,
  5.             IntlDateFormatter::FULL,
  6.             IntlDateFormatter::FULL,
  7.             'America/Monterrey',
  8.             IntlDateFormatter::GREGORIAN,
  9.             'EEEE'
  10. );
  11.  
  12. echo $fmt->format($date); //miércoles
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.