hi,
i think u have to get the year from the date then place a switch case for example
case "7":
if(i==0)
str1="Seven Thousand"
else if(i==1)
str1=str1+" Seven hundred"
else if(i==3)
{
if(flag1==1) str1=str1+" Seventeen";
else
str1=str1+" Seven";
flag=0;
flag1=0;
}
else str1=str1+" Seventy";
break;
for each and every digit from 1 to 9 u should place the code with small change
flag represents that in the third place there is 0
for example 2007 u should get as two thousand six
and flag1 for 1 if 2017 u should get as two thousand seventeen
for 0 just make flag=1
case "0":
flag=1;
break;
and for 1 if it is in 3 position then make flag1=1
i hope u understood
hai everybody
i wants to know, in date how to print year in words using javascript. please help me.