Here, In RUBY I need a format of Like this
“February 1st 2011 11.00”
. I tried this one
"Time.now.utc.strftime("%B %d %Y %R")"
But I need to format numerals with suffixes st, nd, rd, th etc. Please suggest something.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you specifically want “February 1st 2011 11.00” you would need to add your own DATE_FORMATS and call that.
If all you want is an ordinal date and “February 28th, 2011 02:12” works, then call Time.now.to_s(:long_ordinal)