Diferencia entre revisiones de «Widget:Calendario maya»
Línea 282: | Línea 282: | ||
if(yb <=0) yb=yb + 20; | if(yb <=0) yb=yb + 20; | ||
− | + | if (yb==1)date.tzolkin.value ="Imix"; {date.tzolkin.value ="Imix"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/c/cd/Imix.gif" width="64px">';} | |
− | else if (yb==2) date. | + | else if (yb==2) {date.tzolkin.value ="Ik"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/e/e6/Ik.gif" width="64px">';} |
− | else if (yb==3) date. | + | else if (yb==3) {date.tzolkin.value ="Ak'bal"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/4/4c/Akbal.gif" width="64px">';} |
− | else if (yb==4) date. | + | else if (yb==4) {date.tzolkin.value ="K'an"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/9/9e/Kan.gif" width="64px">';} |
− | else if (yb==5) date. | + | else if (yb==5) {date.tzolkin.value ="Chikchan"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/4/4f/Chikchan.gif" width="64px">';} |
− | else if (yb==6) date. | + | else if (yb==6) {date.tzolkin.value ="Kimi"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/2/29/Kimi.gif" width="64px">';} |
− | else if (yb==7) date. | + | else if (yb==7) {date.tzolkin.value ="Manik"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/a/a9/Manik.gif" width="64px">';} |
− | else if (yb==8) date. | + | else if (yb==8) {date.tzolkin.value ="Lamat"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/4/46/Lamat.gif" width="64px">';} |
− | else if (yb==9) date. | + | else if (yb==9) {date.tzolkin.value ="Muluk"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/1/16/Muluk.gif" width="64px">';} |
− | else if (yb==10) date. | + | else if (yb==10) {date.tzolkin.value ="Ok"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/b/ba/Ok.gif" width="64px">';} |
− | else if (yb==11) date. | + | else if (yb==11) {date.tzolkin.value ="Chuen"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/wiki/Archivo:Chuen.gif" width="64px">';} |
− | else if (yb==12) date. | + | else if (yb==12) {date.tzolkin.value ="Eb"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/0/01/Eb.gif" width="64px">';} |
− | else if (yb==13) date. | + | else if (yb==13) {date.tzolkin.value ="Ben"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/b/b2/Ben.gif" width="64px">';} |
− | else if (yb==14) date. | + | else if (yb==14) {date.tzolkin.value ="Ix"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/f/fb/Ix.gif" width="64px">';} |
− | else if (yb==15) date. | + | else if (yb==15) {date.tzolkin.value ="Men"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/f/f1/Men.gif" width="64px">';} |
− | else if (yb==16) date. | + | else if (yb==16) {date.tzolkin.value ="Kib"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/b/bf/Kib.gif" width="64px">';} |
− | + | else if (yb==17) {date.tzolkin.value ="Kaban"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/e/e5/Kaban.gif" width="64px">';} | |
− | else if (yb==18) date. | + | else if (yb==18) {date.tzolkin.value ="Etz'nab"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/f/f8/Etznab.gif" width="64px">';} |
− | else if (yb==19) date. | + | else if (yb==19) {date.tzolkin.value ="Kawak"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/5/55/Kawak.gif" width="64px">';} |
− | else if (yb==0) date. | + | else if (yb==0) {date.tzolkin.value ="Ajau"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/2/2b/Ahau.gif" width="64px">';} |
− | |||
− | |||
− | |||
− | |||
− | |||
Revisión del 13:34 20 dic 2017
<form name="dayForm" style="margin:0; padding:0">
Calendario maya
<tbody>
</tbody>
|
<tbody>
|
</form>
<script>
yb=(tzolkin-haabradical)%20; if(yb <=0) yb=yb + 20;
if (yb==1)date.tzolkin.value ="Imix"; {date.tzolkin.value ="Imix"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==2) {date.tzolkin.value ="Ik"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==3) {date.tzolkin.value ="Ak'bal"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==4) {date.tzolkin.value ="K'an"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==5) {date.tzolkin.value ="Chikchan"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==6) {date.tzolkin.value ="Kimi"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==7) {date.tzolkin.value ="Manik"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==8) {date.tzolkin.value ="Lamat"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==9) {date.tzolkin.value ="Muluk"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==10) {date.tzolkin.value ="Ok"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==11) {date.tzolkin.value ="Chuen"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/wiki/Archivo:Chuen.gif" width="64px">';} else if (yb==12) {date.tzolkin.value ="Eb"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==13) {date.tzolkin.value ="Ben"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==14) {date.tzolkin.value ="Ix"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==15) {date.tzolkin.value ="Men"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==16) {date.tzolkin.value ="Kib"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==17) {date.tzolkin.value ="Kaban"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==18) {date.tzolkin.value ="Etz'nab"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==19) {date.tzolkin.value ="Kawak"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';} else if (yb==0) {date.tzolkin.value ="Ajau"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';}
ybrad = (tzolradical-haabradical-(haabkin * 7))%13
if(ybrad <=0) ybrad=ybrad + 13; date.ybrad.value =ybrad;
}
function getjulian(year,month,day){
if (month < 3) {month += 12; year -= 1};
a = Math.floor(year/100); b = 2-a+Math.floor(a/4); j = Math.floor(365.25*(year+4716))+ Math.floor(30.6001*(month+1))+ day+b-1524;
return j;
} // -->
</script>