.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

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

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