Search found 1 match

by rtgmath
Wed Apr 01, 2009 4:49 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: DateItems to the nth
Replies: 15
Views: 11752

How about this?

Code: Select all

function datesuffix n
	put "th" into mysuffix
	if n <=3 or (n>=21 and n<=23) then
		put item n mod 10 of "st,nd,rd" into mysuffix
	end if
	return mysuffix
end datesuffix