Diferencia entre revisiones de «Widget:Calendario maya»
Línea 213: | Línea 213: | ||
if (tzolkin==1)date.tzolkin.value ="Imix"; | if (tzolkin==1)date.tzolkin.value ="Imix"; | ||
− | else if (tzolkin==2) date.tzolkin.value =" | + | else if (tzolkin==2) date.tzolkin.value ="Ikk"; |
else if (tzolkin==3) date.tzolkin.value ="Ak'bal"; | else if (tzolkin==3) date.tzolkin.value ="Ak'bal"; | ||
else if (tzolkin==4) date.tzolkin.value ="K'an"; | else if (tzolkin==4) date.tzolkin.value ="K'an"; | ||
Línea 273: | Línea 273: | ||
if (yb==1)date.yb.value ="Imix"; | if (yb==1)date.yb.value ="Imix"; | ||
− | else if (yb==2) date.yb.value =" | + | else if (yb==2) date.yb.value ="Ikk"; |
else if (yb==3) date.yb.value ="Ak'bal"; | else if (yb==3) date.yb.value ="Ak'bal"; | ||
else if (yb==4) date.yb.value ="Kan"; | else if (yb==4) date.yb.value ="Kan"; |
Revisión del 16:01 19 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 ="Ikk"; 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"; 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>