### kal_island ### 6.1.2010 ### Maple procedures for the Icelandic calendar. ### (c) Svante Janson 2010 ### May be freely used and modified for non-commercial properties. ### These procedures are drafts only and not in a final, polished ### version (and probably never will be). ### There is no guarantee that they are correct. ### There is, unfortunately, no further documentation. if # true or (not (Qkal_island_LOADED=true)) then Qkal_island_LOADED:=true; # NB final fi last in the file # To avoid unnecessary repeated loadings of the file, # the line "true or" should be commented away with "#" # While working on the file, remove this "#" if not (Qkal_bas_loaded=true) then read kal_bas fi: if not (Qkal_julgreg_loaded=true) then read kal_julgreg fi: isl_greg:=2342304; #JD för gregoriansk kalender Isl_manad:= ["Harpa","Skerpla","Sólmánuđur","Heyannir","Tvímánuđur","Haustmánuđur", "Gormánuđur","Ýlir","Mörsugur","Ţorri","Góa","Einmánuđur", "aukanćtur"]; ################### Julian version IslJ_FDS:=proc(y) local x; x:=JD4Jul(9,4,y); NextVdag(5,x); end; IslJ_FDW:= y-> IslJ_FDS(y+1)-180; IslJ4JD:=proc(jd) local y,fds,fdw; y:=JulAstroAr4JD(jd); fds:=IslJ_FDS(y); if jd IslG_FDS(y+1)-180; IslG4JD:=proc(jd) local y,fds,fdw; y:=GregAstroAr4JD(jd); fds:=IslG_FDS(y); if jd Isl_FDS(y+1)-180; Isl4JD:=proc(jd) if jd0 then NextVdag(d,Isl_FDS(y)+7*(v-1)); else NextVdag(d,Isl_FDW(y)+7*(-v-1)); fi; end; ###### mest som test: JD4IslJ:=proc(d,m,y); if (m=0) or (m=13) then IslJ_FDS(y)+3*30+d-1; elif m<=3 then IslJ_FDS(y)+30*(m-1)+d-1; else IslJ_FDW(y)+30*(m-7)+d-1; fi; end; JD4IslG:=proc(d,m,y); if (m=0) or (m=13) then IslG_FDS(y)+3*30+d-1; elif m<=3 then IslG_FDS(y)+30*(m-1)+d-1; else IslG_FDW(y)+30*(m-7)+d-1; fi; end; fi;