home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol12n05.zip
/
DAYSUF.SC
next >
Wrap
Text File
|
1992-09-14
|
619b
|
20 lines
; ------------------------------------------------------------
; DAYSUF.SC Paradox
; Accepts a date and returns the appropriate day suffix
; for the day number. For example, returns st for 21,
; th for 15, rd for 3 and so on.
; ------------------------------------------------------------
PROC Daysuf(t)
SWITCH
CASE DAY(t) = 1 OR DAY(t) = 21 OR DAY(t) = 31
: c = "st"
CASE DAY(t) = 2 OR DAY(t) = 22
: c = "nd"
CASE DAY(t) = 3 OR DAY(t) = 23
: c = "rd"
OTHERWISE
: c = "th"
ENDSWITCH
RETURN c
ENDPROC