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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> > 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 > -- > 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2009/3/28 Sijo Kg <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>> > 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> Sijo > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---