Basic question on Date class

R

Robo

From the stdlib docs, I see the Date class has constants like
MONTHNAMES, DAYNAMES, etc. How do I print them out?

I tried puts Date.ABBR_DAYNAMES, or d = Date.today; d.ABBR_DAYNAMES, and
I get undefined method error.

Robo
 
D

daz

Robo said:
From the stdlib docs, I see the Date class has constants like
MONTHNAMES, DAYNAMES, etc. How do I print them out?

I tried puts Date.ABBR_DAYNAMES, or d = Date.today; d.ABBR_DAYNAMES, and
I get undefined method error.

Robo


require 'date'

puts Date::ABBR_DAYNAMES


:daz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top