home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
REXXCH03.ZIP
/
MONTH1.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-03-11
|
652b
|
26 lines
/* to display the days of the month for January */
day.1 = "Sunday"
day.2 = "Monday"
day.3 = "Tuesday"
day.4 = "Wednesday"
day.5 = "Thursday"
day.6 = "Friday"
day.7 = "Saturday"
do dayofmonth = 1 to 31
dayofweek = (dayofmonth+6)//7 + 1
select
when dayofmonth = 1 then th = "st"
when dayofmonth = 2 then th = "nd"
when dayofmonth = 3 then th = "rd"
when dayofmonth = 21 then th = "st"
when dayofmonth = 22 then th = "nd"
when dayofmonth = 23 then th = "rd"
when dayofmonth = 31 then th = "st"
otherwise th = "th"
end
say day.dayofweek dayofmonth||th "January"
end