' DateDay ' Program to produce the Date from the Day Number ' From J Miller Oscar 56 ' Converted for the Amiga by A C Hewat, 17th March 1989 ' Version 1.00 17/03/89 ' Takes the day number and produces the date in the form of year, month ' and day of month. ' do = -722528 ' For AMSAT day number » do = -428 ' For GENERAL day number »» Choose only one ' do = 1720982 ' For JULIAN day at Noon » ' DayNumber from DayDate or change and INPUT "DayNumber ";DayNumber d = DayNumber - do dw = (d+5) - 7*INT((d+5)/7) 'd = d+INT(INT((d+36387&)/36524.25)*3/4)-15 'Omit for dates between 1900 Mar 01 and 2100 Feb 28 year = INT((d-122.1)/365.25) d = d-INT(year*365.25) month = INT(d/30.61) d = d-INT(month*30.6) month = month-1 IF month > 12 THEN month = month-12 : year = year + 1 day$ = MID$("SunMonTueWedThuFriSatSun",3*dw+1,3) month$ = MID$("JanFebMarAprMayJunJulAugSepOctNovDec",3*month-2,3) PRINT dw,d,month,year,day$;" ";d;" ";month$;year