1. Re: EUPHORIA Digest - 24 Oct 1998 to 25 Oct 1998 (#1998-161)
Ralf Nieuwenhuijsen wrote:
> -- Add day
> day = date_seq[3]
> if day = 1 then text = text & " 1st"
> elsif day = 2 then text = text & " 2nd"
> elsif day = 3 then text = text & " 3rd"
elsif day = 21 then text = text & " 21st"
elsif day = 22 then text = text & " 22nd"
elsif day = 23 then text = text & " 23rd"
elsif day = 31 then text = text & " 31st"
> else
> text = text & sprintf (" %dth",{day})
> end if
that's a tad mo' proper/better, dontcha think?? :)
yes, we coulda threaded an algorithm that divided
by ten if it was over ten and checked the remainder
against 1 & 2 & 3; but, i didn't feel like it. do you?
i'm not sure it would be 'cleaner' anyway...
:) Hawke'