-
I want to add the date to my Flash guestbook...
Currently I have this:
entry = "<b>On "+new Date().toString()+", etc. etc.
which yields: On Mon Oct 22 09:10:06 GMT-0400 2001....
What I want is something like: On Monday, October 22 2001 at 9:10 AM.....
How do I use the date object above to configure my date output to get results like that?
Many Thanks!
Rick
-
Hi,
today = new Date();
weekdays = ["Sunday", "Monday", ...];
weekday = weekdays[today.getDay()];
monthnames = ["Janury", "February", "March", ...];
month = monthnames[today.getMonth()];
etc.
Musicman
-
Hi Musicman,
So then my string would be:
entry = "<b>On "+today.getDay().today.getMonth().toString()+" , etc.
??
Thx,
Rick
-
Hi,
I'd prefer
entry = "<b>On "+weekdays[today.getDay()]+", "+monthnames[today.getMonth()]+" "+today.getDate()+", "+today.getFullYear()+ ...
Musicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|