The number of seconds from 1970 to 2039 exceed the INTERGER*4 maximum value. I am using these called subroutines to determine what day of the week a given date (in the future) is. Is there another way to determine the day of week for a given date?
INTEGER *2 iYr,imon,iday,ihr,imin,isec
DO iyr = 2038, 2039
imon = 1
iday = 1
ihr = 1
imin = 1
isec = 8
CALL PACKTIMEQQ (timedate,iyr,imon,iday,ihr,imin,isec)
! The above call generates the packed time in number of seconds
! since 00:00:00 Greenwich mean time, January 1, 1970.
! The above modifies GM time to Central time (6 Hrs difference)
CALL GMTIME (timedate, tarray)
! The above generates an array of information for the packed time in seconds
! The array is Seconds, Minutes, Hours, Day of the Month, Year,
! Day of the Week, Day of the Year, and Daylight Savings Indicator.
JanFirst = tarray(7)
PRINT *, timedate,IYR,JANFIRST