Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/08/2010, 12:37
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 10 meses
Puntos: 310
Respuesta: Funcion de dia, fecha, mes, año, hora

Vamos a pulir el código:
Código Javascript:
Ver original
  1. function onEnterFrame(includingFirstFrame) {
  2. fullDayName = new Array('Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado');
  3. fullMonthName = new Array('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');
  4. horas = new Date();
  5. hora = horas.getHours();
  6. minutos = horas.getMinutes();
  7. segundos = horas.getSeconds();
  8. if (hora < 10) {
  9. hora = "0" + hora;
  10. }
  11. if (minutos < 10) {
  12. minutosfinal = ":0" + minutos;
  13. } else {
  14. minutosfinal = ":" + minutos;
  15. }
  16. if (segundos < 10) {
  17. segundosfinal = ":0" + segundos;
  18. } else {
  19. segundosfinal = ":" + segundos;
  20. }
  21. tiempo = hora + minutosfinal + segundosfinal;
  22. dmy = fullDayName[horas.getDay()]+", "+horas.getDate()+" "+fullMonthName[horas.getMonth()]+" "+horas.getFullYear()+" a las "+tiempo;
  23. }

Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red