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

Forum statistics

Threads
474,150
Messages
2,570,853
Members
47,394
Latest member
Olekdev

Latest Threads

Top