' DayDate ' Program to produce Day Number from the Date. ' From J Miller Oscar 56 ' Converted for the Amiga by A C Hewat, 17th March 1989 ' Version 1.00 17/03/89 ' Takes the date in the form of year, month and day of month and calculates ' its day number. COMMON DayNumber ' do = -722528 ' For AMSAT day number ) do = -428 ' For GENERAL day number )) Choose one only ' do = 1720982 ' For JULIAN day at noon ) ' Calculates the day number from the system date, or change and ' INPUT " Input the Day, Month, and Year ";day,month,year ' GOTO Jump year = VAL(RIGHT$(DATE$,4)) month = VAL(MID$(DATE$,4,2)) day = VAL(LEFT$(DATE$,2)) PRINT DATE$; Jump: PRINT day,month,year y = year m = month d = day IF m <= 2 THEN m = m+12 : y = y-1 DayNumber = -INT(y/100)+INT(y/400)+15 + INT(y*365.25) + INT((m+1)*30.6) + d + do PRINT DayNumber ' The century calculation may be omitted so that: ' DayNumber = INT(y*365.25) + INT((m+1)*30.6) + d + do ' This is only usable from 1900 Mar 01 to 2100 Feb 28 !! 'CHAIN "DateDay"