![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
21/10/2005, 01:06
|
![Avatar de caricatos](http://static.forosdelweb.com/customavatars/avatar18599_4.gif) | Moderador | | Fecha de Ingreso: abril-2002 Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 10 meses Puntos: 1284 | |
Hola leoj90:
¿Qué te parece redefinir el método toString() del objeto Date...?
Código:
Date.prototype.toString = function() {
Meses = ["enero","febrero","marzo","abril","mayo","junio",
"julio","agosto","septiembre","octubre","noviembre","diciembre"];
return this.getDate() + "/" + Meses[this.getMonth()] + "/" + this.getFullYear() + " | " + this.getHours() + ":" + this.getMinutes();
}
... y luego simplemente mostrar un objeto...
alert(new Date());
Saludos
__________________ Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo |