Diferencia entre revisiones de «Widget:Mayan calendar»
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 ="Ik"; |
else if (tzolkin==3) date.tzolkin.value ="Akbal"; | else if (tzolkin==3) date.tzolkin.value ="Akbal"; | ||
else if (tzolkin==4) date.tzolkin.value ="Kan"; | else if (tzolkin==4) date.tzolkin.value ="Kan"; | ||
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 ="Akbal"; | else if (yb==3) date.yb.value ="Akbal"; | ||
else if (yb==4) date.yb.value ="Kan"; | else if (yb==4) date.yb.value ="Kan"; |
Revisión del 15:41 19 dic 2017
<form name="dayForm" style="margin:0; padding:0">
Ancient Mayan Calendars
<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 ="Akbal"; else if (yb==4) date.yb.value ="Kan"; else if (yb==5) date.yb.value ="Chicchan"; 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 ="Muluc"; else if (yb==10) date.yb.value ="Oc"; 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 ="Cib"; else if (yb==17) date.yb.value ="Caban"; else if (yb==18) date.yb.value ="Etznab"; else if (yb==19) date.yb.value ="Cauac"; 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>