Hi All,
just something to to watch!
Rem Project: countdown
Rem Created: 21/09/2008 16:00:09
Rem ***** Main Source File *****
`1. first calculate the day of the year
date$=get date$()
print date$
month =val(left$(date$,2))
day = val(mid$(date$,4)+mid$(date$,5))
year = val("20"+right$(date$,2))
N1 = floor( (275 * month) / 9)
N2 = floor((month + 9) / 12)
N3 = (1.0 + floor((year - 4.0 * floor(year / 4.0) + 2.0) / 3.0))
N = N1 - (N2 * N3) + day - 30
left=365-n-6
`print 5184000
time$ = get time$()
hr=val(left$(time$,2))
min = val(mid$(time$,4)+mid$(time$,5))
sec = val(right$(time$,2))
set text font "aeril"
set text size 70
do
cls
time$ = get time$()
hr=24-val(left$(time$,2))
min =60- val(mid$(time$,4)+mid$(time$,5))
sec =60 - val(right$(time$,2))
box 0,0,screen width(),screen height(),RGB(0,255,0),RGB(255,0,0),RGB(255,255,0),RGB(255,255,128)
center text screen width()/2,screen height()/2-105,"Days left"
center text screen width()/2,screen height()/2-35,"to Christmas"
center text screen width()/2,screen height()/2+35,str$(left)
center text screen width()/2,screen height()/2+105,str$(hr)+":"+str$(min)+":"+str$(sec)
loop
edit
added zeros to start of numbers.
Rem Project: countdown
Rem Created: 21/09/2008 16:00:09
Rem ***** Main Source File *****
`1. first calculate the day of the year
date$=get date$()
print date$
month =val(left$(date$,2))
day = val(mid$(date$,4)+mid$(date$,5))
year = val("20"+right$(date$,2))
N1 = floor( (275 * month) / 9)
N2 = floor((month + 9) / 12)
N3 = (1.0 + floor((year - 4.0 * floor(year / 4.0) + 2.0) / 3.0))
N = N1 - (N2 * N3) + day - 30
left=365-n-6
`print 5184000
time$ = get time$()
hr=val(left$(time$,2))
min = val(mid$(time$,4)+mid$(time$,5))
sec = val(right$(time$,2))
set text font "aeril"
set text size 70
do
cls
time$ = get time$()
hr$=str$(24-val(left$(time$,2)))
min$ =str$(60- val(mid$(time$,4)+mid$(time$,5)))
sec$ =str$(60 - val(right$(time$,2)))
if len(hr$)=1 then hr$="0"+hr$
if len(min$)=1 then min$="0"+min$
if len(sec$)=1 then sec$="0"+sec$
box 0,0,screen width(),screen height(),RGB(0,255,0),RGB(255,0,0),RGB(255,255,0),RGB(255,255,128)
center text screen width()/2,screen height()/2-105,"Days left"
center text screen width()/2,screen height()/2-35,"to Christmas"
center text screen width()/2,screen height()/2+35,str$(left)
center text screen width()/2,screen height()/2+105,hr$+":"+min$+":"+sec$
loop
Dark Physics makes any hot drink go cold.