Diferencia entre revisiones de «Widget:Calendario maya»
Línea 172: | Línea 172: | ||
</div> | </div> | ||
− | <div id=" | + | <div id="diaimg" width="100px" height="100px"></div> |
+ | <div id="baktunimg" width="100px" height="100px"></div> | ||
+ | <div id="katunimg" width="100px" height="100px"></div> | ||
+ | <div id="tunimg" width="100px" height="100px"></div> | ||
+ | <div id="uinalimg" width="100px" height="100px"></div> | ||
+ | <div id="kinimg" width="100px" height="100px"></div> | ||
+ | <div id="tzolkinimg" width="100px" height="100px"></div> | ||
+ | <div id="haabimg" width="100px" height="100px"></div> | ||
+ | <div id="nocheimg" width="100px" height="100px"></div> | ||
</form> | </form> | ||
Línea 214: | Línea 222: | ||
tzolkin=xdays-(20*(Math.floor((xdays)/20))); | tzolkin=xdays-(20*(Math.floor((xdays)/20))); | ||
− | if (tzolkin==1)date.tzolkin.value ="Imix"; | + | if (tzolkin==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 (tzolkin==2) date.tzolkin.value ="Ik"; | + | else if (tzolkin==2) {date.tzolkin.value ="Ik"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/e/e6/Ik.gif" width="64px">';} |
− | else if (tzolkin==3) date.tzolkin.value ="Ak'bal"; | + | else if (tzolkin==3) {date.tzolkin.value ="Ak'bal"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/4/4c/Akbal.gif" width="64px">';} |
− | else if (tzolkin==4) date.tzolkin.value ="K'an"; | + | else if (tzolkin==4) {date.tzolkin.value ="K'an"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/9/9e/Kan.gif" width="64px">';} |
− | else if (tzolkin==5) date.tzolkin.value ="Chikchan"; | + | else if (tzolkin==5) {date.tzolkin.value ="Chikchan"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/4/4f/Chikchan.gif" width="64px">';} |
− | else if (tzolkin==6) date.tzolkin.value ="Kimi"; | + | else if (tzolkin==6) {date.tzolkin.value ="Kimi"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/2/29/Kimi.gif" width="64px">';} |
− | else if (tzolkin==7) date.tzolkin.value ="Manik"; | + | else if (tzolkin==7) {date.tzolkin.value ="Manik"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/a/a9/Manik.gif" width="64px">';} |
− | else if (tzolkin==8) date.tzolkin.value ="Lamat"; | + | else if (tzolkin==8) {date.tzolkin.value ="Lamat"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/4/46/Lamat.gif" width="64px">';} |
− | else if (tzolkin==9) date.tzolkin.value ="Muluk"; | + | else if (tzolkin==9) {date.tzolkin.value ="Muluk"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/1/16/Muluk.gif" width="64px">';} |
− | else if (tzolkin==10) date.tzolkin.value ="Ok"; | + | else if (tzolkin==10) {date.tzolkin.value ="Ok"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/b/ba/Ok.gif" width="64px">';} |
− | else if (tzolkin==11) date.tzolkin.value ="Chuen"; | + | else if (tzolkin==11) {date.tzolkin.value ="Chuen"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/wiki/Archivo:Chuen.gif" width="64px">';} |
− | else if (tzolkin==12) date.tzolkin.value ="Eb"; | + | else if (tzolkin==12) {date.tzolkin.value ="Eb"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/0/01/Eb.gif" width="64px">';} |
− | else if (tzolkin==13) date.tzolkin.value ="Ben"; | + | else if (tzolkin==13) {date.tzolkin.value ="Ben"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/b/b2/Ben.gif" width="64px">';} |
− | else if (tzolkin==14) date.tzolkin.value ="Ix"; | + | else if (tzolkin==14) {date.tzolkin.value ="Ix"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/f/fb/Ix.gif" width="64px">';} |
− | else if (tzolkin==15) date.tzolkin.value ="Men"; | + | else if (tzolkin==15) {date.tzolkin.value ="Men"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/f/f1/Men.gif" width="64px">';} |
− | else if (tzolkin==16) date.tzolkin.value ="Kib"; | + | else if (tzolkin==16) {date.tzolkin.value ="Kib"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/b/bf/Kib.gif" width="64px">';} |
− | else if (tzolkin==17) {date.tzolkin.value ="Kaban"; document.getElementById(" | + | else if (tzolkin==17) {date.tzolkin.value ="Kaban"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/e/e5/Kaban.gif" width="64px">';} |
− | else if (tzolkin==18) date.tzolkin.value ="Etz'nab"; | + | else if (tzolkin==18) {date.tzolkin.value ="Etz'nab"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/f/f8/Etznab.gif" width="64px">';} |
− | else if (tzolkin==19) date.tzolkin.value ="Kawak"; | + | else if (tzolkin==19) {date.tzolkin.value ="Kawak"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/5/55/Kawak.gif" width="64px">';} |
− | else if (tzolkin==0) date.tzolkin.value ="Ajau"; | + | else if (tzolkin==0) {date.tzolkin.value ="Ajau"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/2/2b/Ahau.gif" width="64px">';} |
else if (tzolkin>19) date.tzolkin.value = "error"; | else if (tzolkin>19) date.tzolkin.value = "error"; | ||
Línea 290: | Línea 298: | ||
else if (yb==15) date.yb.value ="Men"; | else if (yb==15) date.yb.value ="Men"; | ||
else if (yb==16) date.yb.value ="Kib"; | else if (yb==16) date.yb.value ="Kib"; | ||
− | else if (yb==17) {date.yb.value ="Kaban"; document.getElementById(" | + | else if (yb==17) {date.yb.value ="Kaban"; document.getElementById("tzolkinimg").innerHTML= '<img src="http://cnbguatemala.org/images/e/e5/Kaban.gif" width="64px">';} |
else if (yb==18) date.yb.value ="Etz'nab"; | else if (yb==18) date.yb.value ="Etz'nab"; | ||
else if (yb==19) date.yb.value ="Kawac"; | else if (yb==19) date.yb.value ="Kawac"; |
Revisión del 12:43 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.yb.value ="Imix"; else if (yb==2) date.yb.value ="Ik"; else if (yb==3) date.yb.value ="Ak'bal"; else if (yb==4) date.yb.value ="Kan"; else if (yb==5) date.yb.value ="Chikchan"; else if (yb==6) date.yb.value ="Kimi"; else if (yb==7) date.yb.value ="Manik"; else if (yb==8) date.yb.value ="Lamat"; else if (yb==9) date.yb.value ="Muluk"; else if (yb==10) date.yb.value ="Ok"; else if (yb==11) date.yb.value ="Chuen"; else if (yb==12) date.yb.value ="Eb"; else if (yb==13) date.yb.value ="Ben"; else if (yb==14) date.yb.value ="Ix"; else if (yb==15) date.yb.value ="Men"; else if (yb==16) date.yb.value ="Kib";
else if (yb==17) {date.yb.value ="Kaban"; document.getElementById("tzolkinimg").innerHTML= '<img src="" width="64px">';}
else if (yb==18) date.yb.value ="Etz'nab"; else if (yb==19) date.yb.value ="Kawac"; else if (yb==0) date.yb.value ="Ahau"; else if (yb>19) date.yb.value = "error";
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>