home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
portfoli
/
pbas45.lzh
/
100day.bas
next >
Wrap
BASIC Source File
|
1990-11-25
|
1KB
|
47 lines
rem bj gleason
rem fixed date calculations for january
rem changed x,y corrdinates for 2.1
cls
dim m(12)
' days in each month
m(1)=31:m(2)=28:m(3)=31:m(4)=30
m(5)=31:m(6)=30:m(7)=31:m(8)=31
m(9)=30:m(10)=31:m(11)=30:m(12)=31
print "Enter Court Date"
r=2:c=1
gosub 1000 ' get the first date
d1 = d
d = d1 + 100
gosub 2000
box 5,1,7,40,1
locate 6,8:print "100 Days Later : " month "/" day "/" year
end
1000 ' read in date, convert to days
' in D
locate r,c:input "Month";month
locate r+1,c:input "Day ";day
locate r+2,c:input "Year ";year
if (year%4)=0 then m(2)=29 else m(2)=28
d = 0
' get number of days this year
for x = 1 to month-1
d = d + m(x)
next x
if month = 1 then d = 0
d = d + int(year*365.25) + day
return
2000 ' convert d to date
year = int(d / 365.25)
if (year%4)=0 then m(2)=29 else m(2)=28
d = d - int(year*365.25)
for x = 1 to 12
if d < m(x) then month=x-1:goto 2010
d = d - m(x)
next x
2010
if month < 1 then month = 1
day = d
return
ə