Mayan calendar: Difference between revisions
Content deleted Content added
Line 281: | Line 281: | ||
intent(in) :: day,month,year |
intent(in) :: day,month,year |
||
! |
! |
||
integer(kind=4) :: j,l, numdays |
integer(kind=4) :: j,l, numdays, keptdays |
||
integer(kind=4) :: kin_no, winal_no, tun_no, katun_no, baktun_no, longcount_no |
integer(kind=4) :: kin_no, winal_no, tun_no, katun_no, baktun_no, longcount_no |
||
character(*) :: haab_carry, nightlord, tzolkin_carry, long_carry |
character(*) :: haab_carry, nightlord, tzolkin_carry, long_carry |
||
Line 288: | Line 288: | ||
! |
! |
||
keptdays = julday(day,month,year) ! Get the Julian date for selected date |
keptdays = julday(day,month,year) ! Get the Julian date for selected date |
||
numdays = keptdays ! Keep for calcs |
numdays = keptdays ! Keep for calcs later |
||
! Adjust from the beginning |
! Adjust from the beginning |
||
numdays = numdays-startdate ! Adjust the number of days from start of Mayan Calendar |
numdays = numdays-startdate ! Adjust the number of days from start of Mayan Calendar |
||
savedays = numdays ! Save for later when we canculate Haab etc. |
|||
if (numdays .ge. longcount)then ! We check if we have passed a longcount and need to adjust for a new start |
if (numdays .ge. longcount)then ! We check if we have passed a longcount and need to adjust for a new start |
||
longcount_no = numdays/longcount |
longcount_no = numdays/longcount |