I’m using Date.today.month to display the month number. Is there a command to get the month name, or do I need to make a case to get it?
I’m using Date.today.month to display the month number. Is there a command to get
Share
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.
Date::MONTHNAMES[Date.today.month]would give you "January". (You may need torequire 'date'first).Can also use
Date::ABBR_MONTHNAMES[Date.today.month]which gives "Jan".