Posted By

nicolaspar on 07/26/06


Tagged


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

luman
neverwolf
Leech
willcodeforfood
jacinmontava


Php - Días y meses en español


 / Published in: PHP
 

  1. function getDia( $timestamp = 0 ){
  2. $timestamp = $timestamp == 0 ? time() : $timestamp;
  3. $dias = array('Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sábado');
  4. return $dias[date("w", $timestamp)];
  5. }
  6.  
  7. function getMes( $timestamp = 0 ){
  8. $timestamp = $timestamp == 0 ? time() : $timestamp;
  9. $meses = array('','Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
  10. return $meses[date("n", $timestamp)];
  11. }

Report this snippet  

You need to login to post a comment.