
I have been learning so much here on the forums, thx much all.
Could also do this as below, but no real improvement.
Code: Select all
function datesuffix n
put "th" into mysuffix
if n is among "1,2,3,21,22,23" then
put item n mod 10 of "st,nd,rd" into mysuffix
end if
return mysuffix
end datesuffix