P
ROTOTYPE
I'm Not Only The Prototype, I'm Also A Member.
home
▪
stats
▪
search
▪
linkback
▪
about
▪
FAQ
| user: guest,
login
,
register
Date
:
returns the current Date with suffix eg: 01st October
author:
kamal
[+]
,
Submitted: 10.01.05 4a
Date.prototype.getFullDate = function(){ weekday = new Array('Sunday', 'Monday', 'Tuessday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); month = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); tmpDate = new Date(); day = weekday[tmpDate.getDay()]; monthname = month[tmpDate.getMonth()]; year = tmpDate.getFullYear(); date = tmpDate.getDate(); if(length(date)==1) { date = "0"+date; } switch(date.charAt(1)) { case "1": suff = "st"; break; case "2": suff = "nd"; break; case "3": suff = "rd"; break; default: suff = "th"; } return date+suff+" "+day+","+monthname+" "+year; };
usage
Usage: currDate = new Date(); trace(currDate.getFullDate()); //This prototypes returns the current CPU Date....in the Following Format... 01st Saturday,October 2005
Add Comment
[+]
›opyleft 2001-2010. Layer51 is: Jaime Prado.
@