Help with date format

HI Everybody,

I have one date instant. I want to format the date using strftime
method, and the result I want is

2008 Jan 06th

Here How can I add the suffix with the day like (1st, 2nd, 3rd, 4th
etc).

Thanks with regards,
Veeraa.T

I don’t believe you’re going to get that directly using strftime.
You’ll need to write your own helper method to return the day part
with 1st, 2nd, etc. You could use strftime inside that helper to give
you 2008 Jan 06 then concatenate the st, nd or th to the end of the
string. That shouldn’t be too difficult to write.

On Jan 6, 12:29 am, Veera S. <rails-mailing-l…@andreas-

http://svn.webtest.wvu.edu/repos/rails/plugins/eztime/ might help.