A couple of alternative 'time' proggies...
In DBP.
The UK format Date:
dim mm$(11)
mm$(0)="January"
mm$(1)="February"
mm$(2)="March"
mm$(3)="April"
mm$(4)="May"
mm$(5)="June"
mm$(6)="July"
mm$(7)="August"
mm$(8)="September"
mm$(9)="October"
mm$(10)="November"
mm$(11)="December"
dim dd$(3)
dd$(0)="th"
dd$(1)="st"
dd$(2)="nd"
dd$(3)="rd"
d=0
cls
date$=get date$()
month$=left$(date$,2)
month=(val(month$)-1)
day$=right$(left$(date$,5),2)
day=(val(day$))
year$=right$(date$,2)
year=(val(year$))
shortmonth$=month$
shortday$=day$
shortyear$=year$
if month<10 then shortmonth$=right$(month$,1)
if day<10 then shortday$=right$(day$,1)
if year<10 then shortyear$=right$(year$,1)
if day=1 or day=21 or day=31 then d=1
if day=2 or day=22 then d=2
if day=3 or day=23 then d=3
print day$;"/";month$;"/";year$
print day$;"/";month$;"/20";year$
print shortday$;"/";shortmonth$;"/";shortyear$
print day$;dd$(d);" ";mm$(month);", 20";year$
print "The ";day$;dd$(d);" of ";mm$(month);", 20";year$
wait key
edited: missed out a -1. The correct line is now as follows:
The stopwatch:
I'll be debugging this one for a while...
tt=0
do
tt=tt+1
if dd>365 then dd=0 : inc yy,1
if hh>23 then hh=0 : inc dd,1
if mm>59 then mm=0 : inc hh,1
if ss>59 then ss=0 : inc mm,1
if tt>99 then tt=0 : inc ss,1
if tt=0 then tt$="00"
if tt>0 and tt<10 then tt$="0"+str$(tt)
if tt=>10 and tt<100 then tt$=str$(tt)
if ss=0 then ss$="00"
if ss>0 and ss<10 then ss$="0"+str$(ss)
if ss=>10 and ss<60 then ss$=str$(ss)
if mm=0 then mm$="00"
if mm>0 and mm<10 then mm$="0"+str$(mm)
if mm=>10 and mm<60 then mm$=str$(mm)
if hh=0 then hh$="00"
if hh>0 and hh<10 then hh$="0"+str$(hh)
if hh=>10 and hh<24 then hh$=str$(hh)
if dd=0 then dd$="000"
if dd>0 and dd<10 then dd$="00"+str$(dd)
if dd=>10 and dd<100 then dd$="0"+str$(dd)
if dd=>100 and dd<366 then dd$=str$(dd)
if yy=0 then yy$="000"
if yy>0 and yy<10 then yy$="00"+str$(yy)
if yy=>10 and yy<100 then yy$="0"+str$(yy)
if yy=>100 and yy<=999 then yy$=str$(yy)
if yy>999 then yy=0
cls
print "Press 'return' to pause. Press any key to continue..."
print yy$;"y:";dd$;"d:";hh$;"h:";mm$;"m:";ss$;"s:";tt$
if returnkey()=1 then wait key
sync
loop
I have an XP3000+, 1.5gb DDR333, a 6600GT and I'm programming 3k text-based exe's?!