.ago

Hi
I have
m = 1.year.ago.mon #This I get 3

 But how to get name of month ie  March from above?

Thanks in advance
Sijo

Hi
This is a question related to above I tried
%w(1.year.ago.strftime("%b") 11.month.ago.strftime("%b"))
I expected [“Mar”,“Apr”]
But did not work.Could you please correct it?

Sijo

m = 1.years.ago.strftime("%b") #=> Mar
m = 1.years.ago.strftime("%B") #=> March

On Sat, Mar 28, 2009 at 3:14 PM, Sijo Kg
[email protected]wrote:

Posted via http://www.ruby-forum.com/.


[73, 32, 108, 111, 118, 101, 32, 121, 111, 117, 32, 115, 111, 32, 109,
117,
99, 104, 33].map{|c| c.chr}.join

Only two surfaces of a box:
http://blog.pixnet.net/zusocfc

2009/3/28 Sijo Kg [email protected]

Hi
This is a question related to above I tried
%w(1.year.ago.strftime("%b") 11.month.ago.strftime("%b"))
I expected [“Mar”,“Apr”]
But did not work.Could you please correct it?

[1.year.ago.strftime("%b"),11.month.ago.strftime("%b")]

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs