Public Voice Network
- Best American band of all… 129129
- Auto Racing? 88
- Chick of the Day 1825618256
- Public domain?
- QBN Personas 1212
- Chick of the day .Gif 5555
- Pic of the Day 7479074790
- Align shortcode Divs? 1616
- Viewing Old PC Hard Drive… 77
- Paid vacation? 2727
- You're Doing It Wrong… 88
- weird 3d stuff 9696
- The Purge 2020
- blog 5771357713
- Hiphop like this. 7474
- DaftPunk 224224
- the gif animation thread 1849618496
- CSS z-Index 11
- Cape Cod 1414
- Technological Eye Strain 1717
- Bitcoin 130130
- QBN EXPATS 4141
- Architecture of the Day 436436
- Cool tumblr themes? 1010
Show day/date in Flash/JS 22 Responses
Last post: 8 years, 6 months ago | Thread started: Nov 13, 04, 4:53 a.m.
- atle
Hello! Long time since I've posted here now :) Good to be back.
Anyhoo, what I need help with is a simple date "script". Quite like the one on top of this site. Where it says "saturday Nov 13, 204". I need a way to do this in Flash or with javascript. If it's JS, it has to let mes use gif's on the date.
Any tips?
- Nov 13, 04, 4:53 a.m. – Permalink
- sureshot
myDate = new Date();
myDay = myDate.getDay();
myNumber = myDate.getDate();
myMonth = myDate.getMonth();
myYear = myDate.getFullYear();switch (myDay) {
case 0:
myFullDay = "Sunday";
break;
case 1:
myFullDay = "Monday";
break;
case 2:
myFullDay = "Tuesday";
break;
case 3:
myFullDay = "Wednesday";
break;
case 4:
myFullDay = "Thursday";
break;
case 5:
myFullDay = "Friday";
break;
case 6:
myFullDay = "Saturday";
break;
}switch (myMonth) {
case 0:
myFullMonth = "January";
break;
case 1:
myFullMonth = "February";
break;
case 2:
myFullMonth = "March";
break;
case 3:
myFullMonth = "April";
break;
case 4:
myFullMonth = "May";
break;
case 5:
myFullMonth = "June";
break;
case 6:
myFullMonth = "July";
break;
case 7:
myFullMonth = "August";
break;
case 8:
myFullMonth = "September";
break;
case 9:
myFullMonth = "October";
break;
case 10:
myFullMonth = "November";
break;
case 11:
myFullMonth = "December";
break;
}exte = "th";
switch (myNumber) {
case 1:
exte = "st";
break;
case 2:
exte = "nd";
break;
case 3:
exte = "rd";
break;
}currentDate = myFullMonth + ", " + myFullDay + " " + myNumber + exte + " " + myYear;
than create a dynamic text field with var: currentDate


- Dog-earNov 13, 04, 5:16 a.m. – Permalink



