Log In · Register

 
 
Closed TopicStart new topic
code*HELP~!, help!
layourfeavergurl
post Nov 29 2004, 06:56 PM
Post #1


Senior Member
***

Group: Member
Posts: 58
Joined: Nov 2004
Member No: 62,393



i have a b-day code can somyune put in all the info .. b/c i dont kno how too .. also u can AIM me or PM or e-mail me to ask wat my day is etc... heres the code!

<!-- begin code provided by createblog.com -->
<!-- begin code provided by createblog.com -->
</tr><script language="JavaScript1.2">

var today = new Date;
var Future0 = new Date;

var BirthMonth = 6;
var BirthDate = 20;
var BirthYear = 1987;
BirthMonth--;

Future0.setMonth(BirthMonth, BirthDate);
if (Date.parse(today) > Date.parse(Future0))
{
Future0.setFullYear(today.getYear()+1);
age = (today.getYear() - BirthYear) + 1;
}
else
{age = today.getYear() - BirthYear;}

if (age % 10 == 0)
ageend = 'th';
else if (age % 10 == 4)
ageend = 'th';
else if (age % 10 == 5)
ageend = 'th';
else if (age % 10 == 6)
ageend = 'th';
else if (age % 10 == 7)
ageend = 'th';
else if (age % 10 == 8)
ageend = 'th';
else if (age % 10 == 9)
ageend = 'th';
else if (age % 10 == 1)
ageend = 'st';
else if (age % 10 == 2)
ageend = 'nd';
else if (age % 10 == 3)
ageend = 'rd';


var faraevent = "<font color=#99CC33><i>my birthday</font>";

today1 = Date.parse(today);
future1 = Date.parse(Future0);
secleft = future1 - today1;
miliday = 24 * 60 * 60 * 1000;
daysleft = secleft/miliday;
daysleftint = Math.round(daysleft);

if (daysleftint > 1)
document.write(" ", daysleftint, " days until <font color=#99CC33>my <i>", age, ageend, "</i> birthday</font>");
else if (daysleftint == 1)
document.write("<font color=#99CC33>my <i>", age, ageend, "</i> birthday</font> is tomorrow");
else if (today1 == future1)
document.write("<font color=#99CC33>my <i>", age, ageend, "</i> birthday</font> is today");
else
document.write("passed");
</script><br>
<!-- end code provided by createblog.com -->
<!-- end code provided by createblog.com -->
 
pAtRiCk_sTar
post Nov 29 2004, 08:34 PM
Post #2


jellyfishing, jellyfishing
******

Group: Member
Posts: 1,174
Joined: Oct 2004
Member No: 55,185



QUOTE
var BirthMonth = 6;
var BirthDate = 20;
var BirthYear = 1987;


where it says var BirthMonth, put the number of the month you were born, jan-1 feb-2, etc..

where it says var BirthDate put in the day you were born

var BirthYear you put in the year you were born.......

that's all u really hafta do, it kinda does it all for you, unless you want to change the text, but it's all kind of the same stuff. also, if it ends in something wierd, like

16rd or 1nd

then you'll have to ask again for more help to change it to 16th or 1st or however u want it laugh.gif
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: