Traditional Culture Encyclopedia - The 24 Solar Terms - Find the code for calendar conversion.

Find the code for calendar conversion.

& ltscript type = " text/JavaScript " & gt;

Ml = new array (3 1, 28,31,30,31,30,31,30,31);

nm = new Array();

Nm[0]= new array (0, "02 17", "03 18", "04 17", "05 17", "06 15".

Nm[ 1]= new array (0, "0206", "0308", "0406", "0506", "0605", "0704", "0803", "090 1",.

Nm[2]= new array (5, "0 127", "0225", "0326", "0424", "0524", "0622", "0722", "0820", "09/kl". " 1 1 17 "," 1 17 "," 12 17 "," 65438

Nm[3]= new array (0, "02 14", "03 15", "04 14", "05 13", "061/kloc.

Nm[4]= new array (0, "0203", "0305", "0403", "0503", "060 1", "0630", "0730", "0828" and "0927".

Nm[5]= new array (3, "0 124", "0222", "0324", "0422", "0522", "0620", "07 19", "08/kloc". " 1 16 "," 1 14 "," 1438 "

Nm[6]= new array (0, "02 12", "03 12", "041","05 10", "0609".

Nm[7]= new array (8, "0 13 1", "0302", "033 1", "0430", "0529", "0628", "0727",.

Nm[8]= new array (0, "02 18", "0320", "04 19", "06 17", "07 17", "08/kloc".

Nm[9]= new array (0, "0208", "0309", "0408", "0508", "0606", "0706", "0804", "0903", "1002".

Nm[ 10]= new array (6, "0 128", "0227", "0327", "0426", "0525", "0624", "0724", "0822".

Nm[ 1 1]= new array (0, "02 15", "03 17", "04 15", "06 15".

Nm[ 12]= new array (0, "0205", "0306", "0405", "0504", "0602", "0702", "073 1", "0830".

Nm[ 13]= new array (4, "0 125", "0224", "0325", "0424", "0523", "062 1", "072/kl"

Nm[ 14]= new array (0, "02 13", "03 14", "04 12", "05 12", "06/kloc".

Nm[ 15]= new array (0, "0202", "0303", "0402", "050 1", "053 1", "0629", "0728".

Nm[ 16]= new array (3, "0 12 1", "0220", "0322", "042 1", "0520" and "06/kloc".

Nm[ 17]= new array (0, "0209", "03 1 1", "04 10", "0509", "0608", "0708".

nm[ 18]=new Array(7," 0 130 "," 0228 "," 0329 "," 0427 "," 0527 "," 0626 "," 0725 "," 0824 "," 0922 "," 1022 "," 1 120 "," 1220 "," 13 18));

Nm[ 19]= new array (0, "02 17", "03 18", "04 17", "05 16", "06/kloc".

Nm[20]= new array (0, "0206", "0308", "0406", "0505", "0604", "0703", "0802", "090 1", "0930".

Nm[2 1]= new array (5, "0 127", "0225", "0327", "0425", "0524", "0623", "0722", "082/.

Nm[22]= new array (0, "02 15", "03 15", "04 14", "05 13", "061/.

Nm[23]= new array (0, "0203", "0305", "0403", "0503", "060 1", "0630", "0730", "0828" and "0926".

Nm[24]= new array (4, "0 123", "0222", "0324", "0422", "0522", "0620", "07 19", "08/.

Nm[25]= new array (0, "02 1 1", "03 13", "04 12", "05 1 1".

Nm[26]= new array (8, "0 13 1", "030 1", "033 1", "0429", "0529", "0627".

Nm[27]= new array (0, "02 18", "0320", "04 18", "06 17", "07 16", "08/.

Nm[28]= new array (0, "0207", "0309", "0407", "0507", "0606", "0705", "0804", "0903", "1002".

Nm[29]= new array (6, "0 128", "0227", "0328", "0426", "0526", "0624", "0724", "0823", "092/. " 1 120 "," 120 "," 12 19 "," 15438

Nm[30]= new array (0, "02 16", "03 17", "04 15", "05 14", "06 13".

Nm[3 1]= new array (0, "0205", "0306", "0405", "0504", "0602", "0702", "073 1", "0829".

Nm[32]= new array (4, "0 125", "0224", "0325", "0424", "0523", "062 1", "072 1".

Nm[33]= new array (0, "02 13", "03 15", "04 13", "061","07/kloc"

Nm[34]= new array (0, "0202", "0303", "040 1", "050 1", "053 1", "0629", "0728".

Nm[35]= new array (2, "0 12 1", "0220", "032 1", "0420", "0520", "06 18".

Nm[36]= new array (0, "0209", "03 10", "0409", "0509", "0607", "0707", "0806", "0904",/kloc.

Nm[37]= new array (6, "0 129", "0228", "0329", "0428", "0527", "0626", "0726", "0824" and "0923". " 1 12 1 "," 122 1 "," 12 1 "," 1365438

Nm[38]= new array (0, "02 17", "03 18", "04 16", "06 14", "07 14".

Nm[39]= new array (0, "0206", "0308", "0406", "0505", "0604", "0703", "0802", "083 1", "0930".

Nm[40]= new array (5, "0 127", "0225", "0327", "0425", "0524", "0623", "0722", "0820", "09/.

Nm[4 1]= new array (0, "02 15", "03 16", "04 15", "05 14", "06/kloc".

Nm[42]= new array (0, "0204", "0304", "0403", "0503", "060 1", "0630", "0730", "0828" and "0926".

Nm[43]= new array (3, "0 123", "022 1", "0323", "0422", "052 1", "0620" and "07/kloc".

Nm[44]= new array (0, "02 10", "03 12", "041","05 1 1".

Nm[45]= new array (8, "0 13 1", "030 1", "033 1", "0430", "0529", "0628".

Nm[46]= new array (0, "02 19", "03 19", "04 18", "05 17", "06 16.

Nm[47]= new array (0, "0207", "0309", "0407", "0507", "0605", "0705", "0803", "0902", "1002".

Nm[48]= new array (5, "0 128", "0227", "0328", "0426", "0526", "0624", "0723", "0822", "092/. " 1 1 19 "," 12 19 "," 12 19 ","

Nm[49]= new array (0, "02 16", "03 18", "04 16", "05 15", "06 14".

Function length (y, m){

if((m = = 2)& amp; & ((y+50)% 4 = = 0)) returns 29;

Otherwise, return ml [(m+11)%12];

}

Function ctog (form)

y = form . year . selectedindex;

m = form . month . selectedindex+ 1;

d = form . day . selectedindex+ 1;

If ((table R. checked)&; & amp(m! = nm[y][0]){

Form.answer.value= "This date does not exist";

Return;

}

if(((form . r . checked)& amp; & amp(m = = nm[y][0])| |((nm[y][0]>; 0)& amp; & amp(m & gtnm[y][0]))m = m+ 1;

outm=Number(nm[y][m])。 substring(0,2));

outd=Number(nm[y][m])。 substring(2,4))+d- 1;

if(outd & gt; Length (y, outm)){) (

outd=outd-length(y,outm);

outm = outm+ 1;

}

outy = y+ 1950;

if(outm & gt; 12){

outm = outm- 12;

outy = outy+ 1;

}

form . answer . value = " "+outy+"-"+outm+"-"+outd+" ";

}

Function gtoc (form)

y = form . year . selectedindex;

m = form . month . selectedindex+ 1;

d = form . day . selectedindex+ 1;

if(d & gt; Length (y, m)){) (

Form.answer.value= "This date does not exist";

Return;

}

Md = string (d);

if(MD . length & lt; 2)MD = " 0 "+MD;

Md = string (m)+MD;

if(MD . length & lt; 4)MD = " 0 "+MD;

for(I = 0; I<= 12; i++) {

if((Number(nm[y][I+ 1])& gt; Number(md))||(i+ 1==nm[y]。 Length)) broken;

}

if(i==0){

if(y==0){

Form.answer.value= "beyond the calculation range";

Return;

}

y = y- 1;

i=(nm[y])。 Length)-1;

Md = character string (number (MD)+1200);

if(Number(nm[y][I])& gt; Number (MD)) I = I-1;

}

if(nm[y][i]。 substring(0,2)==md.substring(0,2)) outd=Number(md.substring(2,4))-Number(nm[y][i]。 substring(2,4))+ 1;

else outd=length(y,Number(nm[y][i])。 substring(0,2)))+Number(md.substring(2,4))-Number(nm[y][i]。 substring(2,4))+ 1;

outm = I;

r =

if(nm[y][0]! =0){

if(outm = = nm[y][0]+ 1)rn = " leap ";

if(outm & gt; nm[y][0])outm = outm- 1;

}

outy = y+ 1950;

Form.answer.value= "Lunar calendar" +outy+ "Year" +r+outm+ "Month" +outd+ "Day";

}

& lt/script & gt;

& lt form & gt

Lunar date: 19

& lt option & gt50 & lt/option & gt;;

& lt option & gt51< /option & gt;

& lt option & gt52 & lt/option & gt;;

& lt option & gt53 & lt/option & gt;;

& lt option & gt54 & lt/option & gt;;

& lt option & gt55 & lt/option & gt;;

& lt option & gt56 & lt/option & gt;;

& lt option & gt57 & lt/option & gt;;

& lt option & gt58 & lt/option & gt;;

& lt option & gt59 & lt/option & gt;;

& lt option & gt60 & lt/option & gt;;

& lt option & gt61< /option & gt;

& lt option & gt62 & lt/option & gt;;

& lt option & gt63 & lt/option & gt;;

& lt option & gt64 & lt/option & gt;;

& lt option & gt65 & lt/option & gt;;

& lt option & gt66 & lt/option & gt;;

& lt option & gt67 & lt/option & gt;;

& lt option & gt68 & lt/option & gt;;

& lt option & gt69 & lt/option & gt;;

& lt option & gt70 & lt/option & gt;;

& lt option & gt71< /option & gt;

& lt option & gt72 & lt/option & gt;;

& lt option & gt73 & lt/option & gt;;

& lt option & gt74 & lt/option & gt;;

& lt option & gt75 & lt/option & gt;;

& lt option & gt76 & lt/option & gt;;

& lt option & gt77 & lt/option & gt;;

& lt option & gt78 & lt/option & gt;;

& lt option & gt79 & lt/option & gt;;

& ltoption selected = " selected " & gt80 & lt/option & gt;

& lt option & gt81< /option & gt;

& lt option & gt82 & lt/option & gt;;

& lt option & gt83 & lt/option & gt;;

& lt option & gt84 & lt/option & gt;;

& lt option & gt85 & lt/option & gt;;

& lt option & gt86 & lt/option & gt;;

& lt option & gt87 & lt/option & gt;;

& lt option & gt88 & lt/option & gt;;

& lt option & gt89 & lt/option & gt;;

& lt option & gt90 & lt/option & gt;;

& lt option & gt91< /option & gt;

& lt option & gt92 & lt/option & gt;;

& lt option & gt93 & lt/option & gt;;

& lt option & gt94 & lt/option & gt;;

& lt option & gt95 & lt/option & gt;;

& lt option & gt96 & lt/option & gt;;

& lt option & gt97 & lt/option & gt;;

& lt option & gt98 & lt/option & gt;;

& lt option & gt99 & lt/option & gt;;

& lt/select & gt; Year < select size = "1"name = "month" >

& ltoption selected = " selected " & gt 1 & lt; /option & gt;

& lt option & gt2 & lt/option & gt;;

& lt option & gt3 & lt/option & gt;;

& lt option & gt4 & lt/option & gt;;

& lt option & gt5 & lt/option & gt;;

& lt option & gt6 & lt/option & gt;;

& lt option & gt7 & lt/option & gt;;

& lt option & gt8 & lt/option & gt;;

& lt option & gt9 & lt/option & gt;;

& lt option & gt 10 & lt; < /option & gt;

& lt option & gt11< /option & gt;

& lt option & gt12 < /option & gt;

& lt/select & gt; Month < select size=" 1" name="day ">

& ltoption selected = " selected " & gt 1 & lt; /option & gt;

& lt option & gt2 & lt/option & gt;;

& lt option & gt3 & lt/option & gt;;

& lt option & gt4 & lt/option & gt;;

& lt option & gt5 & lt/option & gt;;

& lt option & gt6 & lt/option & gt;;

& lt option & gt7 & lt/option & gt;;

& lt option & gt8 & lt/option & gt;;

& lt option & gt9 & lt/option & gt;;

& lt option & gt 10 & lt; < /option & gt;

& lt option & gt11< /option & gt;

& lt option & gt12 < /option & gt;

& lt option & gt13 < /option & gt;

& lt option & gt14 < /option & gt;

& lt option & gt15 < /option & gt;

& lt option & gt16 < /option & gt;

& lt option & gt17 < /option & gt;

& lt option & gt18 < /option & gt;

& lt option & gt19 < /option & gt;

& lt option & gt20 & lt/option & gt;;

& lt option & gt21< /option & gt;

& lt option & gt22 & lt/option & gt;;

& lt option & gt23 & lt/option & gt;;

& lt option & gt24 & lt/option & gt;;

& lt option & gt25 & lt/option & gt;;

& lt option & gt26 & lt/option & gt;;

& lt option & gt27 & lt/option & gt;;

& lt option & gt28 & lt/option & gt;;

& lt option & gt29 & lt/option & gt;;

& lt option & gt30 & lt/option & gt;;

& lt/select & gt; day < input type = " checkbox " name = " r " value = " on "/& gt; leap month—intercalary month in the lunar calendar

& lt/form & gt;