Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var MAYAN_COUNT_EPOCH = 584282.5;
- function jd_to_mayan_count(jd)
- {
- var d, baktun, katun, tun, uinal, kin;
- jd = Math.floor(jd) + 0.5;
- d = jd - MAYAN_COUNT_EPOCH;
- baktun = Math.floor(d / 144000);
- d = mod(d, 144000);
- katun = Math.floor(d / 7200);
- d = mod(d, 7200);
- tun = Math.floor(d / 360);
- d = mod(d, 360);
- uinal = Math.floor(d / 20);
- kin = mod(d, 20);
- return new Array(baktun, katun, tun, uinal, kin);
- }
Advertisement
Add Comment
Please, Sign In to add comment