stat("It is [day], the [cardinal(date)] of [month]")
proc
cardinal(n as num)
switch(n)
if(1||21||31)
return "[n]st"
else if(2||22)
return "[n]nd"
else if(3||23)
return "[n]rd"
else
return "[n]th"
Problem description: It is the 10nd of January. It is the 1st of January. It is the 2st of January. Thanks.
However there are two better ways to do this. If you're sending output to a browse() result, which can't use most text macros, I'd use this:
In a stat() command or any regular output, just use the \th macro:
Lummox JR