cygnusx1z
10-01-2003, 09:05 AM
I have a script that inputs "today's" date into a text field. Today is October 1st and it seems I did something wrong because the date is showing up as 010/01/2003.
My code is:
Date.prototype.toString = function () {return [this.getMonth() < 10 ? '0' + (this.getMonth()+1) : (this.getMonth()+1), this.getDate() < 10 ? '0' + this.getDate() : this.getDate(), this.getFullYear()].join('/')}
Thanks in advance.
My code is:
Date.prototype.toString = function () {return [this.getMonth() < 10 ? '0' + (this.getMonth()+1) : (this.getMonth()+1), this.getDate() < 10 ? '0' + this.getDate() : this.getDate(), this.getFullYear()].join('/')}
Thanks in advance.