Mayan calendar: Difference between revisions

Line 281:
intent(in) :: day,month,year
!
integer(kind=4) :: j,l, numdays, savedays, keptdays
integer(kind=4) :: kin_no, winal_no, tun_no, katun_no, baktun_no, longcount_no
character(*) :: haab_carry, nightlord, tzolkin_carry, long_carry
Line 288:
!
keptdays = julday(day,month,year) ! Get the Julian date for selected date
numdays = keptdays ! Keep for calcs later
! Adjust from the beginning
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
longcount_no = numdays/longcount