home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
DATABASE
/
HANDYP10.LBR
/
GETXTIME.CZD
/
GETXTIME.CMD
Wrap
OS/2 REXX Batch file
|
2000-06-30
|
3KB
|
118 lines
store 722099+peek(63732)+peek(63733)*256 to x
store int(x/365.26)+1 to y
store x+int(395.25-365.25*y) to d
if int(y/4)*4=y
store 1 to d1
else
store 2 to d1
endif
if d>(91-d1)
store d+d1 to d
endif
store int(d/30.57) to m
store d-int(30.57*m) to d
if m>12
store 1 to m
store y+1 to y
endif
store y-1900 to y
store str(m,2)+'/'+str(d,2)+'/'+str(y,2) to date
set date to &date
store date() to holddate
store x+(int(-x/7)*7) to x
if x=0
store 'Saturday, ' to today
else
if x=1
store 'Sunday, ' to today
else
if x=2
store 'Monday, ' to today
else
if x=3
store 'Tuesday, ' to today
else
if x=4
store 'Wednesday, ' to today
else
if x=5
store 'Thursday, ' to today
else
store 'Friday, ' to today
endif 5
endif 4
endif 3
endif 2
endif 1
endif 0
if m=1
store today+'January 'to today
else
if m=2
store today+'February ' to today
else
if m=3
store today+'March ' to today
else
if m=4
store today+'April ' to today
else
if m=5
store today+'May ' to today
else
if m=6
store today+'June ' to today
else
if m=7
store today+'July ' to today
else
if m=8
store today+'August ' to today
else
if m=9
store today+'September ' to today
else
if m=10
store today+'October ' to today
else
if m=11
store today+'November ' to today
else
store today+'December ' to today
endif 11
endif 10
endif 9
endif 8
endif 7
endif 6
endif 5
endif 4
endif 3
endif 2
endif 1
store today+str(d,2)+', 19'+str(y,2) to today
store peek(63734) to hour
store peek(63735) to min
store hour-6*int(hour/16) to hour
store min-6*int(min/16) to min
if hour>12 .or. hour=12
store hour-12 to hour
store ' p.m. '+today to today
else
store ' a.m. '+today to today
endif
if hour=0
store 12 to hour
endif
if min<10
store '0'+str(min,1) to minute
else
store str(min,2) to minute
endif
store str(hour,2)+':'+minute+today to today
return
ore '0'+str(min,1) to minute
else
store str(min,2) to minute
endif
store