had to added this to it so I can find it late on.
It show length of time its been running.
Rem Project: show_day_month_year
Rem Created: Friday, January 29, 2010
Rem ***** Main Source File *****
global day
global month
global year
global n
global d
global datestring$
global elapedstr$
global lasttime
global newtime
dim daymonth(19) as string
daymonth(0)="Sunday"
daymonth(1)="Monday"
daymonth(2)="Tuesday"
daymonth(3)="Wednesday"
daymonth(4)="Thursday"
daymonth(5)="Friday"
daymonth(6)="Saturday"
daymonth(7)="January"
daymonth(8)="Febuary"
daymonth(9)="March"
daymonth(10)="April"
daymonth(11)="May"
daymonth(12)="June"
daymonth(13)="July"
daymonth(14)="August"
daymonth(15)="September"
daymonth(16)="October"
daymonth(17)="November"
daymonth(18)="December"
write_Date_String()
rem for running timer
lasttime=timer()
do
cls
runningtime()
text 0,12,"running time : "+elapedstr$
text 0,24,get time$()
rem get new day date if clock pass 23:59:59
if left$(get time$(),7)="00:00:0"
write_Date_String()
endif
rem display date sting
text 0,0, datestring$
loop
function get_the_date()
date$=get date$()
month =val(left$(date$,2))
day = val(left$(right$(date$,5),2))
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
a = (14 - month) / 12
y = year - a
m = month + 12 * a - 2
d = (day + y + y / 4 - y / 100 + y / 400 + (31 * m / 12)) mod 7
endfunction
function write_Date_String()
get_the_date()
sign$="th"
if day = 1 or day = 21 or day = 31 then sign$="st"
if day = 2 or day = 22 then sign$="nd"
if day = 3 or day = 23 then sign$="rd"
datestring$=daymonth(d)+" "+str$(day)+sign$+" "+daymonth(6+month)+" "+str$(year)+" day:"+str$(n)+" week:"+str$((n+day / 7))
endfunction
function runningtime()
speedrate=1000
newtime=(newtime+(timer()-newtime)-lasttime)
newtime1=newtime / speedrate
rem find days hours mins
days = newtime1 / 86400
hours = ( newtime1 / 3600 ) - ( days * 24 )
minutes = ( newtime1 / 60 ) - ( days * 1440 ) - ( hours * 60 )
seconds = newtime1 mod 60
rem add a zero if under 10
if days < 10
elapedstr$="0"
endif
elapedstr$ = elapedstr$ + str$( days ) + ":"
if hours < 10
elapedstr$=elapedstr$ + "0"
endif
elapedstr$ = elapedstr$ + str$( hours ) + ":"
if minutes < 10
elapedstr$=elapedstr$ + "0"
endif
elapedstr$ = elapedstr$ + str$( minutes ) + ":"
if seconds < 10
elapedstr$=elapedstr$ + "0"
endif
elapedstr$ = elapedstr$ + str$( seconds )
endfunction
Dark Physics makes any hot drink go cold.